From a54b73e553067bae84ce2e2cc940eddbdd1519d3 Mon Sep 17 00:00:00 2001 From: Ryuta Kambe Date: Sat, 22 Jun 2024 23:53:26 +0900 Subject: [PATCH] fix(probabilistic_occupancy_grid_map): fix knownConditionTrueFalse warning (#7619) Signed-off-by: Ryuta Kambe --- .../occupancy_grid_map_projective.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/perception/probabilistic_occupancy_grid_map/src/pointcloud_based_occupancy_grid_map/occupancy_grid_map_projective.cpp b/perception/probabilistic_occupancy_grid_map/src/pointcloud_based_occupancy_grid_map/occupancy_grid_map_projective.cpp index 79fc6e8c40b5e..3846b3a7d16e7 100644 --- a/perception/probabilistic_occupancy_grid_map/src/pointcloud_based_occupancy_grid_map/occupancy_grid_map_projective.cpp +++ b/perception/probabilistic_occupancy_grid_map/src/pointcloud_based_occupancy_grid_map/occupancy_grid_map_projective.cpp @@ -225,11 +225,9 @@ void OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud( if (dist_index + 1 == obstacle_pointcloud_angle_bin.size()) { const auto & source = obstacle_pointcloud_angle_bin.at(dist_index); - if (!no_visible_point_beyond) { - raytrace( - source.wx, source.wy, source.projected_wx, source.projected_wy, - occupancy_cost_value::NO_INFORMATION); - } + raytrace( + source.wx, source.wy, source.projected_wx, source.projected_wy, + occupancy_cost_value::NO_INFORMATION); continue; } @@ -238,11 +236,6 @@ void OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud( obstacle_pointcloud_angle_bin.at(dist_index).range); if (next_obstacle_point_distance <= obstacle_separation_threshold_) { continue; - } else if (no_visible_point_beyond) { - const auto & source = obstacle_pointcloud_angle_bin.at(dist_index); - const auto & target = obstacle_pointcloud_angle_bin.at(dist_index + 1); - raytrace(source.wx, source.wy, target.wx, target.wy, occupancy_cost_value::NO_INFORMATION); - continue; } auto next_raw_distance =