From 6500c006d7a49303c60a5f64edf481fd8dac6370 Mon Sep 17 00:00:00 2001 From: Vladyslav Usenko Date: Sun, 9 Aug 2020 12:09:49 +0200 Subject: [PATCH] Switched scripts to python3 --- scripts/eval_full/gen_results.py | 42 +++++++++++++------------- scripts/eval_full/gen_results_kitti.py | 12 ++++---- scripts/eval_full/gen_results_tumvi.py | 12 ++++---- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/scripts/eval_full/gen_results.py b/scripts/eval_full/gen_results.py index c459f07..c300123 100755 --- a/scripts/eval_full/gen_results.py +++ b/scripts/eval_full/gen_results.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys @@ -65,34 +65,34 @@ row_format ="{:>17}" + "{:>13}" * (len(datasets)-1) datasets_short = [x[:5] for x in datasets] -print '\nVisual-Inertial Odometry' -print row_format.format(*datasets_short) +print('\nVisual-Inertial Odometry') +print(row_format.format(*datasets_short)) -print row_format.format(*vio['ate']) -#print row_format.format(*vio['time']) -print row_format.format(*vio['num_frames']) +print(row_format.format(*vio['ate'])) +#print(row_format.format(*vio['time'])) +print(row_format.format(*vio['num_frames'])) -print '\nVisual-Inertial Mapping' -print row_format.format(*datasets_short) +print('\nVisual-Inertial Mapping') +print(row_format.format(*datasets_short)) -print row_format.format(*mapping['ate']) -#print row_format.format(*mapping['time']) -print row_format.format(*mapping['num_frames']) +print(row_format.format(*mapping['ate'])) +#print(row_format.format(*mapping['time'])) +print(row_format.format(*mapping['num_frames'])) -print '\nPose-Graph optimization (Identity weights for all factors)' -print row_format.format(*datasets_short) +print('\nPose-Graph optimization (Identity weights for all factors)') +print(row_format.format(*datasets_short)) -print row_format.format(*pose_graph['ate']) -#print row_format.format(*pose_graph['time']) -print row_format.format(*pose_graph['num_frames']) +print(row_format.format(*pose_graph['ate'])) +#print(row_format.format(*pose_graph['time'])) +print(row_format.format(*pose_graph['num_frames'])) -print '\nPure BA optimization (no factors from the recovery used)' -print row_format.format(*datasets_short) +print('\nPure BA optimization (no factors from the recovery used)') +print(row_format.format(*datasets_short)) -print row_format.format(*pure_ba['ate']) -#print row_format.format(*pure_ba['time']) -print row_format.format(*pure_ba['num_frames']) +print(row_format.format(*pure_ba['ate'])) +#print(row_format.format(*pure_ba['time'])) +print(row_format.format(*pure_ba['num_frames'])) diff --git a/scripts/eval_full/gen_results_kitti.py b/scripts/eval_full/gen_results_kitti.py index a51017d..56fb95b 100755 --- a/scripts/eval_full/gen_results_kitti.py +++ b/scripts/eval_full/gen_results_kitti.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys @@ -58,16 +58,16 @@ row_format ="{:>24}" + "{:>10}" * (len(datasets)-1) datasets_short = [x[:5] for x in datasets] -print '\nVisual Odometry (Stereo)' -print row_format.format(*datasets_short) +print('\nVisual Odometry (Stereo)') +print(row_format.format(*datasets_short)) for l in lengths: - print row_format.format(*(vo['trans_error'][l])) + print(row_format.format(*(vo['trans_error'][l]))) -print +print() for l in lengths: - print row_format.format(*(vo['rot_error'][l])) + print(row_format.format(*(vo['rot_error'][l]))) print('Mean translation error [%] ', mean_values['mean_trans_error']/mean_values['total_num_meas']) diff --git a/scripts/eval_full/gen_results_tumvi.py b/scripts/eval_full/gen_results_tumvi.py index 39c3486..16335a6 100755 --- a/scripts/eval_full/gen_results_tumvi.py +++ b/scripts/eval_full/gen_results_tumvi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys @@ -41,12 +41,12 @@ row_format ="{:>17}" + "{:>13}" * (len(datasets)-1) datasets_short = [x[8:].split('_')[0] for x in datasets] -print '\nVisual-Inertial Odometry' -print row_format.format(*datasets_short) +print('\nVisual-Inertial Odometry') +print(row_format.format(*datasets_short)) -print row_format.format(*vio['ate']) -#print row_format.format(*vio['time']) -print row_format.format(*vio['num_frames']) +print(row_format.format(*vio['ate'])) +#print(row_format.format(*vio['time'])) +print(row_format.format(*vio['num_frames']))