(file_name: str, data: str, expect_ate: float, expect_rte: float, expect_roe: float)
| 13 | ("./Scripts/UnitTest/assets/test_config/MACVO/MACVO.yaml", "./Scripts/UnitTest/assets/test_sequence/TartanAir2_abs_P000", 0.002, 0.0025, 0.045), # at 2024 Sept. 22 |
| 14 | ]) |
| 15 | def test_macvo_performance(file_name: str, data: str, expect_ate: float, expect_rte: float, expect_roe: float): |
| 16 | seq = TartanAirV2_StereoSequence(dict( |
| 17 | root=data, |
| 18 | compressed=True, gtFlow=False, gtDepth=False, gtPose=True |
| 19 | )) |
| 20 | cfg, cfg_dict = load_config(Path(file_name)) |
| 21 | result = Sandbox(Path("./cache/macvo_test_temp")) |
| 22 | result.set_autoremove() |
| 23 | result.config = cfg_dict | {"Project": "MACVO_Test"} |
| 24 | |
| 25 | system = MACVO[StereoFrame].from_config(cfg) |
| 26 | system.receive_frames(seq, result) |
| 27 | |
| 28 | headers, metrics = EvaluateSequences([str(result.folder)], False) |
| 29 | |
| 30 | avg_ATE, avg_RTE, avg_ROE = metrics[0][1], metrics[0][4], metrics[0][7] |
| 31 | |
| 32 | assert avg_ATE <= expect_ate, f"Perofmance did not match expectation! get {avg_ATE=}, but expect {expect_ate}" |
| 33 | assert avg_RTE <= expect_rte, f"Perofmance did not match expectation! get {avg_RTE=}, but expect {expect_rte}" |
| 34 | assert avg_ROE <= expect_roe, f"Perofmance did not match expectation! get {avg_ROE=}, but expect {expect_roe}" |
nothing calls this directly
no test coverage detected