Skip to content

Commit afb2ef0

Browse files
committed
chore(ground_segmentation_launch): change max_z of cropbox filter to vehicle_height (autowarefoundation#6549)
* chore(ground_segmentation_launch): change max_z of cropbox filter to vehicle_height Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> * fix: typo Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp> --------- Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
1 parent 49c9330 commit afb2ef0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

launch/tier4_perception_launch/launch/obstacle_segmentation/ground_segmentation/ground_segmentation.launch.py

+24
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ def get_vehicle_mirror_info(self):
7171
return p
7272

7373
def create_additional_pipeline(self, lidar_name):
74+
max_z = (
75+
self.vehicle_info["max_height_offset"]
76+
+ self.ground_segmentation_param[f"{lidar_name}_crop_box_filter"]["parameters"][
77+
"margin_max_z"
78+
]
79+
)
80+
min_z = (
81+
self.vehicle_info["min_height_offset"]
82+
+ self.ground_segmentation_param[f"{lidar_name}_crop_box_filter"]["parameters"][
83+
"margin_min_z"
84+
]
85+
)
7486
components = []
7587
components.append(
7688
ComposableNode(
@@ -85,6 +97,8 @@ def create_additional_pipeline(self, lidar_name):
8597
{
8698
"input_frame": LaunchConfiguration("base_frame"),
8799
"output_frame": LaunchConfiguration("base_frame"),
100+
"max_z": max_z,
101+
"min_z": min_z,
88102
},
89103
self.ground_segmentation_param[f"{lidar_name}_crop_box_filter"]["parameters"],
90104
],
@@ -207,6 +221,14 @@ def create_ransac_pipeline(self):
207221
return components
208222

209223
def create_common_pipeline(self, input_topic, output_topic):
224+
max_z = (
225+
self.vehicle_info["max_height_offset"]
226+
+ self.ground_segmentation_param["common_crop_box_filter"]["parameters"]["margin_max_z"]
227+
)
228+
min_z = (
229+
self.vehicle_info["min_height_offset"]
230+
+ self.ground_segmentation_param["common_crop_box_filter"]["parameters"]["margin_min_z"]
231+
)
210232
components = []
211233
components.append(
212234
ComposableNode(
@@ -221,6 +243,8 @@ def create_common_pipeline(self, input_topic, output_topic):
221243
{
222244
"input_frame": LaunchConfiguration("base_frame"),
223245
"output_frame": LaunchConfiguration("base_frame"),
246+
"max_z": max_z,
247+
"min_z": min_z,
224248
},
225249
self.ground_segmentation_param["common_crop_box_filter"]["parameters"],
226250
],

0 commit comments

Comments
 (0)