Skip to content

Commit 762520e

Browse files
fix: use ring_outlier_filter_node_param (#324)
* Fixed ring_outlier_filter_node_param Signed-off-by: Shintaro Sakoda <[email protected]> * ci(pre-commit): autofix --------- Signed-off-by: Shintaro Sakoda <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 803c445 commit 762520e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

common_sensor_launch/launch/nebula_node_container.launch.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from launch_ros.actions import ComposableNodeContainer
2626
from launch_ros.actions import LoadComposableNodes
2727
from launch_ros.descriptions import ComposableNode
28+
from launch_ros.parameter_descriptions import ParameterFile
2829
from launch_ros.substitutions import FindPackageShare
2930
import yaml
3031

@@ -221,13 +222,18 @@ def create_parameter_dict(*args):
221222
)
222223
)
223224

225+
ring_outlier_filter_node_param = ParameterFile(
226+
param_file=LaunchConfiguration("ring_outlier_filter_node_param_file").perform(context),
227+
allow_substs=True,
228+
)
229+
224230
# Ring Outlier Filter is the last component in the pipeline, so control the output frame here
225-
if LaunchConfiguration("output_as_sensor_frame").perform(context):
226-
ring_outlier_filter_parameters = {"output_frame": LaunchConfiguration("frame_id")}
231+
if LaunchConfiguration("output_as_sensor_frame").perform(context).lower() == "true":
232+
ring_outlier_output_frame = {"output_frame": LaunchConfiguration("frame_id")}
227233
else:
228-
ring_outlier_filter_parameters = {
229-
"output_frame": ""
230-
} # keep the output frame as the input frame
234+
# keep the output frame as the input frame
235+
ring_outlier_output_frame = {"output_frame": ""}
236+
231237
nodes.append(
232238
ComposableNode(
233239
package="autoware_pointcloud_preprocessor",
@@ -237,7 +243,7 @@ def create_parameter_dict(*args):
237243
("input", "rectified/pointcloud_ex"),
238244
("output", "pointcloud_before_sync"),
239245
],
240-
parameters=[ring_outlier_filter_parameters],
246+
parameters=[ring_outlier_filter_node_param, ring_outlier_output_frame],
241247
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
242248
)
243249
)

0 commit comments

Comments
 (0)