Skip to content

Commit 8445a2f

Browse files
committed
refactor: update ground_segmentation plugin names scheme
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
1 parent 62065b4 commit 8445a2f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

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

+15-3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ def create_additional_pipeline(self, lidar_name):
8282
"margin_min_z"
8383
]
8484
)
85+
# Get the plugin name from the full plugin path
86+
ground_segmentation_plugin_name = self.ground_segmentation_param[
87+
f"{lidar_name}_ground_filter"
88+
]["plugin"]
89+
ground_segmentation_plugin_name = ground_segmentation_plugin_name.split("::")[-1]
90+
8591
components = []
8692
components.append(
8793
ComposableNode(
@@ -110,7 +116,7 @@ def create_additional_pipeline(self, lidar_name):
110116
components.append(
111117
ComposableNode(
112118
package="ground_segmentation",
113-
plugin=self.ground_segmentation_param[f"{lidar_name}_ground_filter"]["plugin"],
119+
plugin="autoware::ground_segmentation::" + ground_segmentation_plugin_name,
114120
name=f"{lidar_name}_ground_filter",
115121
remappings=[
116122
("input", f"{lidar_name}/range_cropped/pointcloud"),
@@ -203,7 +209,7 @@ def create_ransac_pipeline(self):
203209
components.append(
204210
ComposableNode(
205211
package="ground_segmentation",
206-
plugin="autoware::ground_segmentation::RANSACGroundFilterComponent",
212+
plugin="autoware::ground_segmentation::" + "RANSACGroundFilterComponent",
207213
name="ransac_ground_filter",
208214
namespace="plane_fitting",
209215
remappings=[
@@ -228,6 +234,12 @@ def create_common_pipeline(self, input_topic, output_topic):
228234
self.vehicle_info["min_height_offset"]
229235
+ self.ground_segmentation_param["common_crop_box_filter"]["parameters"]["margin_min_z"]
230236
)
237+
# Get the plugin name from the full plugin path
238+
ground_segmentation_plugin_name = self.ground_segmentation_param["common_ground_filter"][
239+
"plugin"
240+
]
241+
ground_segmentation_plugin_name = ground_segmentation_plugin_name.split("::")[-1]
242+
231243
components = []
232244
components.append(
233245
ComposableNode(
@@ -256,7 +268,7 @@ def create_common_pipeline(self, input_topic, output_topic):
256268
components.append(
257269
ComposableNode(
258270
package="ground_segmentation",
259-
plugin=self.ground_segmentation_param["common_ground_filter"]["plugin"],
271+
plugin="autoware::ground_segmentation::" + ground_segmentation_plugin_name,
260272
name="common_ground_filter",
261273
remappings=[
262274
("input", "range_cropped/pointcloud"),

0 commit comments

Comments
 (0)