Skip to content

Commit

Permalink
feature: filter load from parameter file
Browse files Browse the repository at this point in the history
Signed-off-by: vividf <[email protected]>
  • Loading branch information
vividf committed Oct 22, 2024
1 parent 3695cab commit d61de9d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
8 changes: 8 additions & 0 deletions common_awsim_labs_sensor_launch/config/filter.param.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**:
ros__parameters:
input_frame: ""
output_frame: ""
max_queue_size: 5
use_indices: false
latched_indices: false
approximate_sync: false
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def create_parameter_dict(*args):
return result

# Pointcloud preprocessor parameters
filter_param = ParameterFile(
param_file=LaunchConfiguration("filter_param_path").perform(context),
allow_substs=True,
)
distortion_corrector_node_param = ParameterFile(
param_file=LaunchConfiguration("distortion_correction_node_param_path").perform(context),
allow_substs=True,
Expand Down Expand Up @@ -98,7 +102,7 @@ def create_parameter_dict(*args):
("input", "pointcloud_raw_ex"),
("output", "self_cropped/pointcloud_ex"),
],
parameters=[cropbox_parameters],
parameters=[filter_param, cropbox_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)
Expand All @@ -120,7 +124,7 @@ def create_parameter_dict(*args):
("input", "self_cropped/pointcloud_ex"),
("output", "mirror_cropped/pointcloud_ex"),
],
parameters=[cropbox_parameters],
parameters=[filter_param, cropbox_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)
Expand Down Expand Up @@ -154,7 +158,7 @@ def create_parameter_dict(*args):
("input", "rectified/pointcloud_ex"),
("output", "pointcloud_before_sync"),
],
parameters=[ring_outlier_filter_node_param],
parameters=[filter_param, ring_outlier_filter_node_param],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)
Expand Down Expand Up @@ -195,6 +199,15 @@ def add_launch_arg(name: str, default_value=None, description=None):
add_launch_arg("frame_id", "lidar", "frame id")
add_launch_arg("use_multithread", "False", "use multithread")
add_launch_arg("use_intra_process", "False", "use ROS2 component container communication")

Check warning on line 201 in common_awsim_labs_sensor_launch/launch/velodyne_node_container.launch.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
add_launch_arg(
"filter_param_path",
os.path.join(
common_sensor_share_dir,
"config",
"filter.param.yaml",
),
description="path to parameter file of filter",
)
add_launch_arg(
"distortion_correction_node_param_path",
os.path.join(
Expand Down

0 comments on commit d61de9d

Please sign in to comment.