Skip to content

Commit

Permalink
feat: filter load from parameter file
Browse files Browse the repository at this point in the history
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
  • Loading branch information
vividf committed Aug 29, 2024
1 parent b798c92 commit f31c1d5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
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
18 changes: 16 additions & 2 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 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

0 comments on commit f31c1d5

Please sign in to comment.