Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(common_sensor_launch): filter load param from file #104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common_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
20 changes: 17 additions & 3 deletions common_sensor_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def create_parameter_dict(*args):
), "Sensor calib file under calibration/ was not found: {}".format(sensor_calib_fp)

# 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 @@ -154,7 +158,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 @@ -176,7 +180,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 @@ -213,7 +217,7 @@ def create_parameter_dict(*args):
("input", "rectified/pointcloud_ex"),
("output", "pointcloud_before_sync"),
],
parameters=[ring_outlier_filter_parameters],
parameters=[filter_param, ring_outlier_filter_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)
Expand Down Expand Up @@ -303,6 +307,16 @@ def add_launch_arg(name: str, default_value=None, description=None):
add_launch_arg(
"vehicle_mirror_param_file", description="path to the file of vehicle mirror position yaml"
)

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
Loading