Skip to content

Commit 4c1153f

Browse files
authored
fix(autoware_ground_segmentation): fix bugprone-branch-clone (#9648)
fix: bugprone-branch-clone Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent 6524f38 commit 4c1153f

File tree

1 file changed

+1
-3
lines changed
  • perception/autoware_ground_segmentation/src/scan_ground_filter

1 file changed

+1
-3
lines changed

perception/autoware_ground_segmentation/src/scan_ground_filter/node.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void ScanGroundFilterComponent::classifyPointCloud(
246246
float radius_distance_from_gnd = pd.radius - prev_gnd_radius;
247247
float height_from_gnd = point_curr.z - prev_gnd_point.z;
248248
float height_from_obj = point_curr.z - non_ground_cluster.getAverageHeight();
249-
bool calculate_slope = false;
249+
bool calculate_slope = true;
250250
bool is_point_close_to_prev =
251251
(points_distance <
252252
(pd.radius * radial_divider_angle_rad_ + split_points_distance_tolerance_));
@@ -264,8 +264,6 @@ void ScanGroundFilterComponent::classifyPointCloud(
264264
// close to the previous point, set point follow label
265265
point_label_curr = PointLabel::POINT_FOLLOW;
266266
calculate_slope = false;
267-
} else {
268-
calculate_slope = true;
269267
}
270268
if (is_point_close_to_prev) {
271269
height_from_gnd = point_curr.z - ground_cluster.getAverageHeight();

0 commit comments

Comments
 (0)