diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ea3d2c..9093fba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,7 +265,7 @@ endif() -install(TARGETS basalt_calibrate basalt_calibrate_imu basalt_vio_sim basalt_mapper_sim basalt_mapper_sim_naive basalt_mapper basalt_opt_flow basalt_vio basalt_kitti_eval basalt +install(TARGETS basalt_calibrate basalt_calibrate_imu basalt_vio_sim basalt_mapper_sim basalt_mapper_sim_naive basalt_mapper basalt_opt_flow basalt_vio basalt_kitti_eval basalt_time_alignment basalt EXPORT BasaltTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib diff --git a/src/time_alignment.cpp b/src/time_alignment.cpp index 4d8b0d5..f461063 100644 --- a/src/time_alignment.cpp +++ b/src/time_alignment.cpp @@ -66,6 +66,8 @@ int main(int argc, char **argv) { std::string output_gyro_path; std::string output_mocap_path; + double max_offset_s = 10.0; + bool show_gui = true; CLI::App app{"Calibrate time offset"}; @@ -89,6 +91,9 @@ int main(int argc, char **argv) { "--output-mocap", output_mocap_path, "Path to output file with mocap rotational velocities for plotting"); + app.add_option("--max-offset", max_offset_s, + "Maximum offset for a grid search in seconds."); + app.add_flag("--show-gui", show_gui, "Show GUI for debugging"); try { @@ -208,7 +213,7 @@ int main(int argc, char **argv) { double best_error = std::numeric_limits::max(); int best_error_idx = -1; - int64_t max_offset_ns = 10000000000; + int64_t max_offset_ns = max_offset_s * 1e9; int64_t offset_inc_ns = 100000; for (int64_t offset_ns = -max_offset_ns; offset_ns <= max_offset_ns; diff --git a/thirdparty/basalt-headers b/thirdparty/basalt-headers index ad09f79..ee71c01 160000 --- a/thirdparty/basalt-headers +++ b/thirdparty/basalt-headers @@ -1 +1 @@ -Subproject commit ad09f793c8cf584f20b453c0a348e520c7e67efd +Subproject commit ee71c0172400419853f675d385ee7e06242facaf