From 8aeb29d3436cca617d2b94353d1cb80a5e6166a2 Mon Sep 17 00:00:00 2001 From: "alexander.huang" <3365826446@qq.com> Date: Tue, 16 Jan 2024 19:10:21 +0800 Subject: [PATCH] fix: fixed the bug of ExtendBackward when the restrict area is not empty --- modules/routing/core/result_generator.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/routing/core/result_generator.cc b/modules/routing/core/result_generator.cc index fc82f2fc1a0..4de747d81dc 100644 --- a/modules/routing/core/result_generator.cc +++ b/modules/routing/core/result_generator.cc @@ -147,6 +147,10 @@ void ResultGenerator::ExtendBackward(const TopoRangeManager& range_manager, double black_s_end = pred_range->back().EndS(); if (!IsCloseEnough(black_s_end, pred_node->Length())) { pred_set.emplace_back(pred_node, black_s_end, pred_node->Length()); + const auto &node_to_insert = GetLargestRange(pred_set); + curr_passage->nodes.insert(curr_passage->nodes.begin(), node_to_insert); + node_set_of_curr_passage.emplace(node_to_insert.GetTopoNode()); + pred_set.clear(); } } else { pred_set.emplace_back(pred_node, 0.0, pred_node->Length());