From c18d41f0b714249e26ea3d89b909d7f0b919a186 Mon Sep 17 00:00:00 2001 From: mice85 Date: Thu, 10 Oct 2024 18:51:42 +0100 Subject: [PATCH] Read poses from list --- scripts/localisation_benchmark/vilens_hba.py | 33 ++++++++++---------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/scripts/localisation_benchmark/vilens_hba.py b/scripts/localisation_benchmark/vilens_hba.py index a33b4cb..99e28d7 100644 --- a/scripts/localisation_benchmark/vilens_hba.py +++ b/scripts/localisation_benchmark/vilens_hba.py @@ -16,19 +16,19 @@ def get_sec_list (dataset_dir, flag_is_all=True): "2024-03-12-keble-college-03", "2024-03-12-keble-college-04", "2024-03-12-keble-college-05", - # "2024-03-13-observatory-quarter-01", - # "2024-03-13-observatory-quarter-02", - # "2024-03-14-blenheim-palace-01", - # "2024-03-14-blenheim-palace-02", - # "2024-03-14-blenheim-palace-05", - # "2024-03-18-christ-church-01", - # "2024-03-18-christ-church-02", - # "2024-03-18-christ-church-03", - # "2024-03-20-christ-church-05", - # "2024-05-20-bodleian-library-02", - # "2024-05-20-bodleian-library-03", - # "2024-05-20-bodleian-library-04", - # "2024-05-20-bodleian-library-05" + "2024-03-13-observatory-quarter-01", + "2024-03-13-observatory-quarter-02", + "2024-03-14-blenheim-palace-01", + "2024-03-14-blenheim-palace-02", + "2024-03-14-blenheim-palace-05", + "2024-03-18-christ-church-01", + "2024-03-18-christ-church-02", + "2024-03-18-christ-church-03", + "2024-03-20-christ-church-05", + "2024-05-20-bodleian-library-02", + "2024-05-20-bodleian-library-03", + "2024-05-20-bodleian-library-04", + "2024-05-20-bodleian-library-05" ] return list_sec @@ -36,6 +36,7 @@ def evaluation_ape_rmse (path_to_gt, path_traj, dataset_dir, method): output = run_command("evo_ape tum {} {} --align --t_max_diff 0.01".format(path_to_gt, path_traj), print_output=False) + rmse = -1 for line in output.stdout: print(line, end="") if "rmse" in line: @@ -69,11 +70,11 @@ def evaluation_ape_rmse (path_to_gt, path_traj, dataset_dir, method): path_to_gt = path_to_sec + "/ground_truth_traj/gt_lidar.txt" print("RUNNING VILENS EVALUATION ...") - path_traj = path_to_sec + "/output_slam" + "/vilens_tum.txt" + path_traj = path_to_sec + "/output_slam" + "/vilens_poses_tum.txt" rmse = evaluation_ape_rmse (path_to_gt, path_traj, dataset_dir, "VILENS") file_name = "hba_poses_tum.txt" - path_traj = path_to_sec + "/output_slam" + "/hba_tum.txt" + path_traj = path_to_sec + "/output_slam" + "/hba_poses_tum.txt" print("RUNNING HBA EVALUATION ...") - rmse = evaluation_ape_rmse (path_gt, path_traj, dataset_dir, "HBA") + rmse = evaluation_ape_rmse (path_to_gt, path_traj, dataset_dir, "HBA") \ No newline at end of file