From 656056c1309273a0b6c360976b7b5698597d3a1c Mon Sep 17 00:00:00 2001 From: CurryMonsters Date: Thu, 2 Apr 2026 12:16:29 +0200 Subject: [PATCH] added track loss timeout to load from landmark yaml --- vortex_utils/include/vortex/utils/waypoint_utils.hpp | 1 + vortex_utils/src/waypoint_utils.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vortex_utils/include/vortex/utils/waypoint_utils.hpp b/vortex_utils/include/vortex/utils/waypoint_utils.hpp index 45c4c65..43aaf49 100644 --- a/vortex_utils/include/vortex/utils/waypoint_utils.hpp +++ b/vortex_utils/include/vortex/utils/waypoint_utils.hpp @@ -29,6 +29,7 @@ struct LandmarkConvergenceGoal { WaypointMode mode; double convergence_threshold{0.1}; double dead_reckoning_threshold{0.5}; + double track_loss_timeout_sec{10.0}; }; /** diff --git a/vortex_utils/src/waypoint_utils.cpp b/vortex_utils/src/waypoint_utils.cpp index da18ac3..17f0c0d 100644 --- a/vortex_utils/src/waypoint_utils.cpp +++ b/vortex_utils/src/waypoint_utils.cpp @@ -159,11 +159,17 @@ LandmarkConvergenceGoal load_landmark_goal_from_yaml( entry["dead_reckoning_threshold"].as(); } + double track_loss_timeout_sec = 10.0; + if (entry["track_loss_timeout_sec"]) { + track_loss_timeout_sec = entry["track_loss_timeout_sec"].as(); + } + return LandmarkConvergenceGoal{ .convergence_offset = convergence_offset, .mode = mode, .convergence_threshold = convergence_threshold, - .dead_reckoning_threshold = dead_reckoning_threshold}; + .dead_reckoning_threshold = dead_reckoning_threshold, + .track_loss_timeout_sec = track_loss_timeout_sec}; } } // namespace vortex::utils::waypoints