From a4dda766f40e1b3e64071fd9915e2e550aeb0ec4 Mon Sep 17 00:00:00 2001 From: kobayu858 <129580202+kobayu858@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:05:33 +0900 Subject: [PATCH] fix(detected_object_validation): fix shadowVariable (#7935) fix:shadowVariable Signed-off-by: kobayu858 --- .../occupancy_grid_map/occupancy_grid_map_validator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perception/detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp b/perception/detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp index ce900f30f4255..c082b4b0f03f1 100644 --- a/perception/detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp +++ b/perception/detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp @@ -163,11 +163,11 @@ void OccupancyGridBasedValidator::showDebugImage( auto mask = getMask(ros_occ_grid, object); const float mean = mask ? cv::mean(occ_grid, mask.value())[0] * 0.01 : 1.0; if (mean_threshold_ < mean) { - auto mask = getMask(ros_occ_grid, object, passed_objects_image); - if (mask) passed_objects_image = mask.value(); + auto passed_mask = getMask(ros_occ_grid, object, passed_objects_image); + if (passed_mask) passed_objects_image = passed_mask.value(); } else { - auto mask = getMask(ros_occ_grid, object, removed_objects_image); - if (mask) removed_objects_image = mask.value(); + auto removed_mask = getMask(ros_occ_grid, object, removed_objects_image); + if (removed_mask) removed_objects_image = removed_mask.value(); } } }