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: always separate lidar preprocessing from pointcloud_container #6091

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
<arg name="eagleye_param_path"/>

<arg name="input_pointcloud" default="/sensing/lidar/top/pointcloud"/>
<arg name="use_pointcloud_container" default="true" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="lidar_container_name" default="/sensing/lidar/top/pointcloud_preprocessor/pointcloud_container"/>

<!-- localization module -->
<group>
<push-ros-namespace namespace="localization"/>
<!-- pose_twist_estimator module -->
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/pose_twist_estimator.launch.xml"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/pose_twist_estimator/pose_twist_estimator.launch.xml">
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>
</include>

<!-- pose_twist_fusion_filter module -->
<group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py">
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>
</include>
</group>
</group>

Expand Down Expand Up @@ -142,7 +144,9 @@
<group if="$(var gnss_enabled)">
<include file="$(find-pkg-share automatic_pose_initializer)/launch/automatic_pose_initializer.launch.xml"/>
</group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py"/>
<include file="$(find-pkg-share tier4_localization_launch)/launch/util/util.launch.py">
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>
</include>
</group>
</group>
</launch>
18 changes: 4 additions & 14 deletions launch/tier4_localization_launch/launch/util/util.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import launch
from launch.actions import DeclareLaunchArgument
from launch.actions import OpaqueFunction
from launch.conditions import LaunchConfigurationNotEquals
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode
Expand Down Expand Up @@ -71,16 +69,9 @@ def load_composable_node_param(param_path):
random_downsample_component,
]

target_container = (
"/sensing/lidar/top/pointcloud_preprocessor/pointcloud_container"
if UnlessCondition(LaunchConfiguration("use_pointcloud_container")).evaluate(context)
else LaunchConfiguration("pointcloud_container_name")
)

load_composable_nodes = LoadComposableNodes(
condition=LaunchConfigurationNotEquals(target_container, ""),
composable_node_descriptions=composable_nodes,
target_container=target_container,
target_container=LaunchConfiguration("lidar_container_name"),
)

return [load_composable_nodes]
Expand Down Expand Up @@ -115,11 +106,10 @@ def add_launch_arg(name: str, default_value=None, description=None):
"path to the parameter file of random_downsample_filter",
)
add_launch_arg("use_intra_process", "true", "use ROS 2 component container communication")
add_launch_arg("use_pointcloud_container", "True", "use pointcloud container")
add_launch_arg(
"pointcloud_container_name",
"/pointcloud_container",
"container name",
"lidar_container_name",
"/sensing/lidar/top/pointcloud_preprocessor/pointcloud_container",
"container name of main lidar used for localization",
)

add_launch_arg(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- LiDAR parameters -->
<arg name="input/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `pointpainting`, `clustering`"/>
<arg name="score_threshold" default="0.35"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
Expand Down Expand Up @@ -62,7 +62,7 @@
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- LiDAR parameters -->
<arg name="input/pointcloud"/>
<arg name="input/obstacle_segmentation/pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>

<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `pointpainting`, `clustering`"/>
<arg name="lidar_detection_score_threshold" default="0.35"/>
Expand Down Expand Up @@ -91,7 +91,7 @@
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `pointpainting`, `clustering`"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>

<!-- Camera parameters -->
<arg name="image_raw0" default="/image_raw" description="image raw topic name"/>
Expand Down Expand Up @@ -59,7 +59,7 @@
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_roi_based_cluster" value="$(var use_roi_based_cluster)"/>
<arg name="detection_by_tracker_param_path" value="$(var detection_by_tracker_param_path)"/>
Expand Down Expand Up @@ -96,7 +96,7 @@
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_roi_based_cluster" value="$(var use_roi_based_cluster)"/>
<arg name="detection_by_tracker_param_path" value="$(var detection_by_tracker_param_path)"/>
Expand All @@ -111,7 +111,7 @@
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="input/radar" value="$(var input/radar)"/>
<arg name="radar_lanelet_filtering_range_param" value="$(var radar_lanelet_filtering_range_param)"/>
Expand All @@ -126,7 +126,7 @@
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="detection_by_tracker_param_path" value="$(var detection_by_tracker_param_path)"/>
</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `clustering`"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="use_validator" default="true" description="use obstacle_pointcloud based validator"/>
<arg name="lidar_detection_score_threshold" default="0.35"/>
<arg name="centerpoint_model_name" default="centerpoint_tiny"/>
Expand All @@ -25,7 +25,7 @@
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_pointcloud_map" value="$(var use_pointcloud_map)"/>
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `clustering`"/>
<arg name="use_object_filter" default="true" description="use object filter"/>
<arg name="use_pointcloud_container" default="false" description="use pointcloud container for detection preprocessor"/>
<arg name="container_name" default="pointcloud_container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="lidar_detection_score_threshold" default="0.35"/>

<!-- Radar parameters -->
Expand All @@ -23,7 +23,7 @@
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="lidar_detection_score_threshold" value="$(var lidar_detection_score_threshold)"/>
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def launch_setup(context, *args, **kwargs):
components = []
components.extend(pipeline.create_pipeline())
individual_container = ComposableNodeContainer(
name=LaunchConfiguration("container_name"),
name=LaunchConfiguration("individual_container_name"),
namespace="",
package="rclcpp_components",
executable=LaunchConfiguration("container_executable"),
Expand All @@ -151,7 +151,7 @@ def launch_setup(context, *args, **kwargs):
)
pointcloud_container_loader = LoadComposableNodes(
composable_node_descriptions=components,
target_container=LaunchConfiguration("container_name"),
target_container=LaunchConfiguration("pointcloud_container_name"),
condition=IfCondition(LaunchConfiguration("use_pointcloud_container")),
)
return [individual_container, pointcloud_container_loader]
Expand All @@ -168,7 +168,8 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("use_multithread", "False")
add_launch_arg("use_intra_process", "True")
add_launch_arg("use_pointcloud_container", "False")
add_launch_arg("container_name", "pointcloud_map_filter_pipeline_container")
add_launch_arg("pointcloud_container_name", "pointcloud_container")
add_launch_arg("individual_container_name", "pointcloud_map_filter_container")
add_launch_arg("use_pointcloud_map", "true")
set_container_executable = SetLaunchConfiguration(
"container_executable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def launch_setup(context, *args, **kwargs):
)
)
individual_container = ComposableNodeContainer(
name=LaunchConfiguration("container_name"),
name=LaunchConfiguration("individual_container_name"),
namespace="",
package="rclcpp_components",
executable=LaunchConfiguration("container_executable"),
Expand All @@ -521,7 +521,7 @@ def launch_setup(context, *args, **kwargs):
)
pointcloud_container_loader = LoadComposableNodes(
composable_node_descriptions=components,
target_container=LaunchConfiguration("container_name"),
target_container=LaunchConfiguration("pointcloud_container_name"),
condition=IfCondition(LaunchConfiguration("use_pointcloud_container")),
)
return [individual_container, pointcloud_container_loader]
Expand All @@ -537,7 +537,8 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("use_multithread", "False")
add_launch_arg("use_intra_process", "True")
add_launch_arg("use_pointcloud_container", "False")
add_launch_arg("container_name", "perception_pipeline_container")
add_launch_arg("pointcloud_container_name", "pointcloud_container")
add_launch_arg("individual_container_name", "ground_segmentation_container")
add_launch_arg("input/pointcloud", "/sensing/lidar/concatenated/pointcloud")

set_container_executable = SetLaunchConfiguration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<arg name="use_intra_process" default="false"/>
<arg name="use_multithread" default="false"/>
<arg name="use_pointcloud_container" default="false"/>
<arg name="container_name" default="occupancy_grid_map_container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="occupancy_grid_map_method" description="options: pointcloud_based_occupancy_grid_map, laserscan_based_occupancy_grid_map, multi_lidar_pointcloud_based_occupancy_grid_map"/>
<arg name="occupancy_grid_map_param_path"/>
<arg name="occupancy_grid_map_updater" description="options: binary_bayes_filter"/>
Expand All @@ -24,7 +24,7 @@
<arg name="use_intra_process" value="$(var use_intra_process)"/>
<arg name="use_multithread" value="$(var use_multithread)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="param_file" value="$(var occupancy_grid_map_param_path)"/>
<arg name="updater_type" value="$(var occupancy_grid_map_updater)"/>
<arg name="updater_param_file" value="$(var occupancy_grid_map_updater_param_path)"/>
Expand All @@ -40,7 +40,7 @@
<arg name="use_intra_process" value="$(var use_intra_process)"/>
<arg name="use_multithread" value="$(var use_multithread)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="param_file" value="$(var occupancy_grid_map_param_path)"/>
<arg name="updater_type" value="$(var occupancy_grid_map_updater)"/>
<arg name="updater_param_file" value="$(var occupancy_grid_map_updater_param_path)"/>
Expand All @@ -56,7 +56,7 @@
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="multi_lidar_fusion_config_file" value="$(var occupancy_grid_map_param_path)"/>
<arg name="updater_type" value="$(var occupancy_grid_map_updater)"/>
<arg name="updater_param_file" value="$(var occupancy_grid_map_updater_param_path)"/>
Expand Down
6 changes: 3 additions & 3 deletions launch/tier4_perception_launch/launch/perception.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
</include>
</group>
Expand All @@ -139,7 +139,7 @@
<arg name="use_intra_process" value="true"/>
<arg name="use_multithread" value="true"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="occupancy_grid_map_method" value="$(var occupancy_grid_map_method)"/>
<arg name="occupancy_grid_map_param_path" value="$(var occupancy_grid_map_param_path)"/>
<arg name="occupancy_grid_map_updater" value="$(var occupancy_grid_map_updater)"/>
Expand Down Expand Up @@ -190,7 +190,7 @@
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
<arg name="use_object_filter" value="$(var use_object_filter)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_roi_based_cluster" value="$(var use_roi_based_cluster)"/>
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def launch_setup(context, *args, **kwargs):
]

occupancy_grid_map_container = ComposableNodeContainer(
name=LaunchConfiguration("container_name"),
name=LaunchConfiguration("individual_container_name"),
namespace="",
package="rclcpp_components",
executable=LaunchConfiguration("container_executable"),
Expand All @@ -126,7 +126,7 @@ def launch_setup(context, *args, **kwargs):

load_composable_nodes = LoadComposableNodes(
composable_node_descriptions=composable_nodes,
target_container=LaunchConfiguration("container_name"),
target_container=LaunchConfiguration("pointcloud_container_name"),
condition=IfCondition(LaunchConfiguration("use_pointcloud_container")),
)

Expand Down Expand Up @@ -174,7 +174,8 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("input_obstacle_pointcloud", "false"),
add_launch_arg("input_obstacle_and_raw_pointcloud", "true"),
add_launch_arg("use_pointcloud_container", "false"),
add_launch_arg("container_name", "occupancy_grid_map_container"),
add_launch_arg("pointcloud_container_name", "pointcloud_container"),
add_launch_arg("individual_container_name", "occupancy_grid_map_container"),
set_container_executable,
set_container_mt_executable,
]
Expand Down
Loading
Loading