Skip to content

Commit

Permalink
feat: fix ground_segmentation.launch.py to prevent autoware death
Browse files Browse the repository at this point in the history
Signed-off-by: yoshiri <[email protected]>
  • Loading branch information
YoshiRi committed Aug 27, 2024
1 parent f2bf929 commit 80bfc95
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from launch.substitutions import PathJoinSubstitution
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode
from launch_ros.parameter_descriptions import ParameterFile
from launch_ros.substitutions import FindPackageShare
import yaml

Expand Down Expand Up @@ -327,7 +328,9 @@ def create_single_frame_obstacle_segmentation_components(self, input_topic, outp
return components

@staticmethod
def create_time_series_outlier_filter_components(input_topic, output_topic):
def create_time_series_outlier_filter_components(
input_topic, output_topic, ogm_outlier_filter_param
):
components = []
components.append(
ComposableNode(
Expand All @@ -339,6 +342,7 @@ def create_time_series_outlier_filter_components(input_topic, output_topic):
("~/input/pointcloud", input_topic),
("~/output/pointcloud", output_topic),
],
parameters=[ogm_outlier_filter_param],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
Expand Down Expand Up @@ -545,6 +549,9 @@ def launch_setup(context, *args, **kwargs):
else pipeline.single_frame_obstacle_seg_output
),
output_topic=pipeline.output_topic,
ogm_outlier_filter_param=ParameterFile(
LaunchConfiguration("ogm_outlier_filter_param_path").perform(context)
),
)
)
pointcloud_container_loader = LoadComposableNodes(
Expand All @@ -565,6 +572,13 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("use_intra_process", "True")
add_launch_arg("pointcloud_container_name", "pointcloud_container")
add_launch_arg("input/pointcloud", "/sensing/lidar/concatenated/pointcloud")
add_launch_arg(
"ogm_outlier_filter_param_path",
[
FindPackageShare("autoware_launch"),
"/config/perception/obstacle_segmentation/occupancy_grid_based_outlier_filter/occupancy_grid_based_outlier_filter.param.yaml",
],
)

set_container_executable = SetLaunchConfiguration(
"container_executable",
Expand Down

0 comments on commit 80bfc95

Please sign in to comment.