From e2e126266280b7f0a96d8964614a05ad686870f8 Mon Sep 17 00:00:00 2001 From: Tomohito ANDO Date: Wed, 8 Mar 2023 16:59:38 +0900 Subject: [PATCH] fix(run_out): place of clearing points (#3021) Signed-off-by: Tomohito Ando --- .../src/scene_module/run_out/dynamic_obstacle.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/planning/behavior_velocity_planner/src/scene_module/run_out/dynamic_obstacle.cpp b/planning/behavior_velocity_planner/src/scene_module/run_out/dynamic_obstacle.cpp index cb570784f9ce9..290cf9af97dd0 100644 --- a/planning/behavior_velocity_planner/src/scene_module/run_out/dynamic_obstacle.cpp +++ b/planning/behavior_velocity_planner/src/scene_module/run_out/dynamic_obstacle.cpp @@ -463,13 +463,9 @@ void DynamicObstacleCreatorForPoints::onSynchronizedPointCloud( const PointCloud2::ConstSharedPtr compare_map_filtered_points, const PointCloud2::ConstSharedPtr vector_map_filtered_points) { - // clear previous obstacle points - { + if (compare_map_filtered_points->data.empty() && vector_map_filtered_points->data.empty()) { std::lock_guard lock(mutex_); obstacle_points_map_filtered_.clear(); - } - - if (compare_map_filtered_points->data.empty() && vector_map_filtered_points->data.empty()) { debug_ptr_->publishEmptyPointCloud(); return; }