From e35719cfdf09da4408a8b675d5e2d7879bea5ab8 Mon Sep 17 00:00:00 2001 From: Tomoya Kimura Date: Thu, 14 Jul 2022 21:08:35 +0900 Subject: [PATCH] fix(map_based_prediction): fix search dist (#1348) Signed-off-by: tomoya.kimura --- .../map_based_prediction/src/map_based_prediction_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perception/map_based_prediction/src/map_based_prediction_node.cpp b/perception/map_based_prediction/src/map_based_prediction_node.cpp index 6c1eda9b655cd..87a4d276512c0 100644 --- a/perception/map_based_prediction/src/map_based_prediction_node.cpp +++ b/perception/map_based_prediction/src/map_based_prediction_node.cpp @@ -814,7 +814,7 @@ std::vector MapBasedPredictionNode::getPredictedReferencePath( const double object_detected_time) { const double delta_horizon = 1.0; - const double obj_vel = object.kinematics.twist_with_covariance.twist.linear.x; + const double obj_vel = std::fabs(object.kinematics.twist_with_covariance.twist.linear.x); std::vector all_ref_paths; for (const auto & current_lanelet_data : current_lanelets_data) {