From d5b7bed8dbecf18c73d0f3b1afc6d357aa15edd8 Mon Sep 17 00:00:00 2001 From: badai-nguyen Date: Mon, 16 Oct 2023 17:35:59 +0900 Subject: [PATCH] fix: add 2d validator option param Signed-off-by: badai-nguyen --- .../launch/obstacle_pointcloud_based_validator.launch.xml | 1 + .../src/obstacle_pointcloud_based_validator.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/perception/detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml b/perception/detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml index 799b605658345..d661e7db33735 100644 --- a/perception/detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml +++ b/perception/detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml @@ -11,5 +11,6 @@ + diff --git a/perception/detected_object_validation/src/obstacle_pointcloud_based_validator.cpp b/perception/detected_object_validation/src/obstacle_pointcloud_based_validator.cpp index 8994c52a44bb1..eff63face1304 100644 --- a/perception/detected_object_validation/src/obstacle_pointcloud_based_validator.cpp +++ b/perception/detected_object_validation/src/obstacle_pointcloud_based_validator.cpp @@ -158,8 +158,8 @@ void ObstaclePointCloudBasedValidator::on3dObjectsAndObstaclePointCloud( trans_obj_position_pcl.y = transformed_object_position.y; trans_obj_position_pcl.z = transformed_object_position.z; kdtree->radiusSearch(trans_obj_position_pcl, search_radius.value(), indices, distances); - for (const auto & indice : indices) { - neighbor_pointcloud->push_back(obstacle_pointcloud->at(indice)); + for (const auto & index : indices) { + neighbor_pointcloud->push_back(obstacle_pointcloud->at(index)); } if (debugger_) debugger_->addNeighborPointcloud(neighbor_pointcloud);