From f7b8ca05f86fa6b4fa208d1f326cd70be47a923e Mon Sep 17 00:00:00 2001 From: kminoda Date: Tue, 16 Jan 2024 18:24:36 +0900 Subject: [PATCH 1/7] feat!: replace use_pointcloud_container Signed-off-by: kminoda --- sample_sensor_kit_launch/launch/lidar.launch.xml | 10 +++------- .../launch/pointcloud_preprocessor.launch.py | 13 +++++++------ sample_sensor_kit_launch/launch/sensing.launch.xml | 4 ++-- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/sample_sensor_kit_launch/launch/lidar.launch.xml b/sample_sensor_kit_launch/launch/lidar.launch.xml index 7b75c770..8ee44365 100644 --- a/sample_sensor_kit_launch/launch/lidar.launch.xml +++ b/sample_sensor_kit_launch/launch/lidar.launch.xml @@ -4,7 +4,7 @@ - + @@ -21,7 +21,6 @@ - @@ -39,7 +38,6 @@ - @@ -57,7 +55,6 @@ - @@ -75,7 +72,6 @@ - @@ -84,8 +80,8 @@ - - + + diff --git a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py index 420854dc..e29aa788 100644 --- a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py +++ b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py @@ -51,19 +51,19 @@ def launch_setup(context, *args, **kwargs): # set container to run all required components in the same process container = ComposableNodeContainer( - name=LaunchConfiguration("container_name"), + name=LaunchConfiguration("individual_container_name"), namespace="", package="rclcpp_components", executable=LaunchConfiguration("container_executable"), composable_node_descriptions=[], - condition=UnlessCondition(LaunchConfiguration("use_pointcloud_container")), + condition=UnlessCondition(LaunchConfiguration("include_concat_node_in_pointcloud_container")), output="screen", ) target_container = ( container - if UnlessCondition(LaunchConfiguration("use_pointcloud_container")).evaluate(context) - else LaunchConfiguration("container_name") + if UnlessCondition(LaunchConfiguration("include_concat_node_in_pointcloud_container")).evaluate(context) + else LaunchConfiguration("pointcloud_container_name") ) # load concat or passthrough filter @@ -85,8 +85,9 @@ def add_launch_arg(name: str, default_value=None): add_launch_arg("base_frame", "base_link") add_launch_arg("use_multithread", "False") add_launch_arg("use_intra_process", "False") - add_launch_arg("use_pointcloud_container", "False") - add_launch_arg("container_name", "pointcloud_preprocessor_container") + add_launch_arg("include_concat_node_in_pointcloud_container", "False") + add_launch_arg("pointcloud_container_name", "pointcloud_container") + add_launch_arg("individual_container_name", "concatenate_container") set_container_executable = SetLaunchConfiguration( "container_executable", diff --git a/sample_sensor_kit_launch/launch/sensing.launch.xml b/sample_sensor_kit_launch/launch/sensing.launch.xml index 9b40ee8a..c4c762e4 100644 --- a/sample_sensor_kit_launch/launch/sensing.launch.xml +++ b/sample_sensor_kit_launch/launch/sensing.launch.xml @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + From 70fa9639e3637730ae1d42fce4406ff178c4d6bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:25:06 +0000 Subject: [PATCH 2/7] style(pre-commit): autofix --- .../launch/pointcloud_preprocessor.launch.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py index e29aa788..3427b2d4 100644 --- a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py +++ b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py @@ -56,13 +56,17 @@ def launch_setup(context, *args, **kwargs): package="rclcpp_components", executable=LaunchConfiguration("container_executable"), composable_node_descriptions=[], - condition=UnlessCondition(LaunchConfiguration("include_concat_node_in_pointcloud_container")), + condition=UnlessCondition( + LaunchConfiguration("include_concat_node_in_pointcloud_container") + ), output="screen", ) target_container = ( container - if UnlessCondition(LaunchConfiguration("include_concat_node_in_pointcloud_container")).evaluate(context) + if UnlessCondition( + LaunchConfiguration("include_concat_node_in_pointcloud_container") + ).evaluate(context) else LaunchConfiguration("pointcloud_container_name") ) From eb509250fb2035a24dbb52b1ccd519519b7cce36 Mon Sep 17 00:00:00 2001 From: kminoda Date: Tue, 16 Jan 2024 22:15:49 +0900 Subject: [PATCH 3/7] fix: now works Signed-off-by: kminoda --- .../launch/nebula_node_container.launch.py | 22 ++++--------------- .../launch/velodyne_VLP16.launch.xml | 6 ++--- .../launch/velodyne_VLS128.launch.xml | 6 ++--- .../launch/lidar.launch.xml | 6 +---- .../launch/pointcloud_preprocessor.launch.py | 6 ++--- 5 files changed, 11 insertions(+), 35 deletions(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index a79681b8..6dabce18 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -195,21 +195,14 @@ def create_parameter_dict(*args): # set container to run all required components in the same process container = ComposableNodeContainer( - name=LaunchConfiguration("container_name"), + name=LaunchConfiguration("lidar_container_name"), namespace="pointcloud_preprocessor", package="rclcpp_components", executable=LaunchConfiguration("container_executable"), composable_node_descriptions=nodes, - condition=UnlessCondition(LaunchConfiguration("use_pointcloud_container")), output="screen", ) - component_loader = LoadComposableNodes( - composable_node_descriptions=nodes, - target_container=LaunchConfiguration("container_name"), - condition=IfCondition(LaunchConfiguration("use_pointcloud_container")), - ) - driver_component = ComposableNode( package="nebula_ros", plugin=sensor_make + "HwInterfaceRosWrapper", @@ -238,19 +231,13 @@ def create_parameter_dict(*args): ], ) - target_container = ( - container - if UnlessCondition(LaunchConfiguration("use_pointcloud_container")).evaluate(context) - else LaunchConfiguration("container_name") - ) - driver_component_loader = LoadComposableNodes( composable_node_descriptions=[driver_component], - target_container=target_container, + target_container=container, condition=IfCondition(LaunchConfiguration("launch_driver")), ) - return [container, component_loader, driver_component_loader] + return [container, driver_component_loader] def generate_launch_description(): @@ -287,8 +274,7 @@ def add_launch_arg(name: str, default_value=None, description=None): ) add_launch_arg("use_multithread", "False", "use multithread") add_launch_arg("use_intra_process", "False", "use ROS 2 component container communication") - add_launch_arg("use_pointcloud_container", "false") - add_launch_arg("container_name", "nebula_node_container") + add_launch_arg("lidar_container_name", "nebula_node_container") set_container_executable = SetLaunchConfiguration( "container_executable", diff --git a/common_sensor_launch/launch/velodyne_VLP16.launch.xml b/common_sensor_launch/launch/velodyne_VLP16.launch.xml index 6197bd14..127709f3 100644 --- a/common_sensor_launch/launch/velodyne_VLP16.launch.xml +++ b/common_sensor_launch/launch/velodyne_VLP16.launch.xml @@ -13,8 +13,7 @@ - - + @@ -32,8 +31,7 @@ - - + diff --git a/common_sensor_launch/launch/velodyne_VLS128.launch.xml b/common_sensor_launch/launch/velodyne_VLS128.launch.xml index 76c24f22..6098e744 100644 --- a/common_sensor_launch/launch/velodyne_VLS128.launch.xml +++ b/common_sensor_launch/launch/velodyne_VLS128.launch.xml @@ -13,8 +13,7 @@ - - + @@ -32,8 +31,7 @@ - - + diff --git a/sample_sensor_kit_launch/launch/lidar.launch.xml b/sample_sensor_kit_launch/launch/lidar.launch.xml index 8ee44365..ff4cf91f 100644 --- a/sample_sensor_kit_launch/launch/lidar.launch.xml +++ b/sample_sensor_kit_launch/launch/lidar.launch.xml @@ -21,7 +21,6 @@ - @@ -38,7 +37,6 @@ - @@ -55,7 +53,6 @@ - @@ -72,7 +69,6 @@ - @@ -80,7 +76,7 @@ - + diff --git a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py index 3427b2d4..0c525ed4 100644 --- a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py +++ b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py @@ -64,9 +64,7 @@ def launch_setup(context, *args, **kwargs): target_container = ( container - if UnlessCondition( - LaunchConfiguration("include_concat_node_in_pointcloud_container") - ).evaluate(context) + if UnlessCondition(LaunchConfiguration("use_pointcloud_container")).evaluate(context) else LaunchConfiguration("pointcloud_container_name") ) @@ -89,7 +87,7 @@ def add_launch_arg(name: str, default_value=None): add_launch_arg("base_frame", "base_link") add_launch_arg("use_multithread", "False") add_launch_arg("use_intra_process", "False") - add_launch_arg("include_concat_node_in_pointcloud_container", "False") + add_launch_arg("use_pointcloud_container", "False") add_launch_arg("pointcloud_container_name", "pointcloud_container") add_launch_arg("individual_container_name", "concatenate_container") From 628ca6756295337ea3642261882a2873180d2ba2 Mon Sep 17 00:00:00 2001 From: kminoda Date: Tue, 16 Jan 2024 22:41:08 +0900 Subject: [PATCH 4/7] revert: revert unnecessary change Signed-off-by: kminoda --- .../launch/nebula_node_container.launch.py | 2 +- common_sensor_launch/launch/velodyne_VLP16.launch.xml | 4 ++-- common_sensor_launch/launch/velodyne_VLS128.launch.xml | 4 ++-- sample_sensor_kit_launch/launch/lidar.launch.xml | 8 ++++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/common_sensor_launch/launch/nebula_node_container.launch.py b/common_sensor_launch/launch/nebula_node_container.launch.py index 6dabce18..b1d178b1 100644 --- a/common_sensor_launch/launch/nebula_node_container.launch.py +++ b/common_sensor_launch/launch/nebula_node_container.launch.py @@ -195,7 +195,7 @@ def create_parameter_dict(*args): # set container to run all required components in the same process container = ComposableNodeContainer( - name=LaunchConfiguration("lidar_container_name"), + name=LaunchConfiguration("container_name"), namespace="pointcloud_preprocessor", package="rclcpp_components", executable=LaunchConfiguration("container_executable"), diff --git a/common_sensor_launch/launch/velodyne_VLP16.launch.xml b/common_sensor_launch/launch/velodyne_VLP16.launch.xml index 127709f3..f0fcc075 100644 --- a/common_sensor_launch/launch/velodyne_VLP16.launch.xml +++ b/common_sensor_launch/launch/velodyne_VLP16.launch.xml @@ -13,7 +13,7 @@ - + @@ -31,7 +31,7 @@ - + diff --git a/common_sensor_launch/launch/velodyne_VLS128.launch.xml b/common_sensor_launch/launch/velodyne_VLS128.launch.xml index 6098e744..d2797ac8 100644 --- a/common_sensor_launch/launch/velodyne_VLS128.launch.xml +++ b/common_sensor_launch/launch/velodyne_VLS128.launch.xml @@ -13,7 +13,7 @@ - + @@ -31,7 +31,7 @@ - + diff --git a/sample_sensor_kit_launch/launch/lidar.launch.xml b/sample_sensor_kit_launch/launch/lidar.launch.xml index ff4cf91f..0dcd67a9 100644 --- a/sample_sensor_kit_launch/launch/lidar.launch.xml +++ b/sample_sensor_kit_launch/launch/lidar.launch.xml @@ -4,7 +4,7 @@ - + @@ -21,6 +21,7 @@ + @@ -37,6 +38,7 @@ + @@ -53,6 +55,7 @@ + @@ -69,6 +72,7 @@ + @@ -77,7 +81,7 @@ - + From 40faf920a06ee667cca95c93a6c838e602d4a4e9 Mon Sep 17 00:00:00 2001 From: kminoda Date: Wed, 17 Jan 2024 09:33:25 +0900 Subject: [PATCH 5/7] include_concat_node_in_pointcloud_container to use_pointcloud_container Signed-off-by: kminoda --- .../launch/pointcloud_preprocessor.launch.py | 2 +- sample_sensor_kit_launch/launch/sensing.launch.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py index 0c525ed4..d1587b15 100644 --- a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py +++ b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py @@ -57,7 +57,7 @@ def launch_setup(context, *args, **kwargs): executable=LaunchConfiguration("container_executable"), composable_node_descriptions=[], condition=UnlessCondition( - LaunchConfiguration("include_concat_node_in_pointcloud_container") + LaunchConfiguration("use_pointcloud_container") ), output="screen", ) diff --git a/sample_sensor_kit_launch/launch/sensing.launch.xml b/sample_sensor_kit_launch/launch/sensing.launch.xml index c4c762e4..9b40ee8a 100644 --- a/sample_sensor_kit_launch/launch/sensing.launch.xml +++ b/sample_sensor_kit_launch/launch/sensing.launch.xml @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + From 8737af12a3c0160ac04b8b4238e3d29570108980 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 00:33:39 +0000 Subject: [PATCH 6/7] style(pre-commit): autofix --- .../launch/pointcloud_preprocessor.launch.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py index d1587b15..1d1c8824 100644 --- a/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py +++ b/sample_sensor_kit_launch/launch/pointcloud_preprocessor.launch.py @@ -56,9 +56,7 @@ def launch_setup(context, *args, **kwargs): package="rclcpp_components", executable=LaunchConfiguration("container_executable"), composable_node_descriptions=[], - condition=UnlessCondition( - LaunchConfiguration("use_pointcloud_container") - ), + condition=UnlessCondition(LaunchConfiguration("use_pointcloud_container")), output="screen", ) From 44c503c1f42cdfa44b513d91d708b873ca35c2dc Mon Sep 17 00:00:00 2001 From: kminoda Date: Fri, 19 Jan 2024 09:42:15 +0900 Subject: [PATCH 7/7] fix arg name Signed-off-by: kminoda --- sample_sensor_kit_launch/launch/lidar.launch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample_sensor_kit_launch/launch/lidar.launch.xml b/sample_sensor_kit_launch/launch/lidar.launch.xml index 0dcd67a9..7effa7bc 100644 --- a/sample_sensor_kit_launch/launch/lidar.launch.xml +++ b/sample_sensor_kit_launch/launch/lidar.launch.xml @@ -81,7 +81,7 @@ - +