From ba4f10601ae8f920244387676eed5ca7abeb8144 Mon Sep 17 00:00:00 2001 From: koide3 <31344317+koide3@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:54:55 +0900 Subject: [PATCH] limit maximum fast forward steps (#120) --- src/glim/mapping/global_mapping_pose_graph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glim/mapping/global_mapping_pose_graph.cpp b/src/glim/mapping/global_mapping_pose_graph.cpp index 47e2e514..a56b71fd 100644 --- a/src/glim/mapping/global_mapping_pose_graph.cpp +++ b/src/glim/mapping/global_mapping_pose_graph.cpp @@ -314,7 +314,7 @@ void GlobalMappingPoseGraph::find_loop_candidates(int current) { const double travel_dist_avg = (submap_targets[i]->travel_dist - submap_targets[left]->travel_dist) / std::max(i - left, 1); const int step = 0.8 * direct_dist / std::min(travel_dist_avg, 100.0); - i += step; + i += std::min(10, step); } continue;