Skip to content

Commit

Permalink
Added another concatenate_data node for localization use and keep the…
Browse files Browse the repository at this point in the history
… original one alone for perception.

Signed-off-by: TaikiYamada4 <[email protected]>
  • Loading branch information
TaikiYamada4 committed Nov 13, 2023
1 parent d175f43 commit f57251f
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions aip_x2_launch/launch/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

def launch_setup(context, *args, **kwargs):
# set concat filter as a component
concat_component = ComposableNode(
perception_concat_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::PointCloudConcatenateDataSynchronizerComponent",
name="concatenate_data",
name="concatenate_data_for_perception",
remappings=[
("~/input/twist", "/sensing/vehicle_velocity_converter/twist_with_covariance"),
("output", "concatenated/pointcloud"),
Expand All @@ -47,7 +47,40 @@ def launch_setup(context, *args, **kwargs):
"/sensing/lidar/rear_upper/outlier_filtered/pointcloud",
"/sensing/lidar/rear_lower/outlier_filtered/pointcloud",
],
"input_offset": [0.025, 0.025, 0.01, 0.0, 0.05, 0.05, 0.05, 0.05],
"input_offset": [0.025, 0.025, 0.01, 0.0, 0.05, 0.05, 0.05, 0.05], # all
# "input_offset": [0.025, 0.01, 0.05, 0.05], # front_lower, left_upper, right_upper, rear_lower
# "input_offset": [0.01, 0.05], # front_lower, left_upper, right_upper, rear_lower
"timeout_sec": 0.075,
"output_frame": LaunchConfiguration("base_frame"),
"input_twist_topic_type": "twist",
}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

localization_concat_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::PointCloudConcatenateDataSynchronizerComponent",
name="concatenate_data_for_localization",
remappings=[
("~/input/twist", "/sensing/vehicle_velocity_converter/twist_with_covariance"),
("output", "localization/concatenated/pointcloud"),
],
parameters=[
{
"input_topics": [
#"/sensing/lidar/front_upper/outlier_filtered/pointcloud",
"/sensing/lidar/front_lower/outlier_filtered/pointcloud",
"/sensing/lidar/left_upper/outlier_filtered/pointcloud",
#"/sensing/lidar/left_lower/outlier_filtered/pointcloud",
"/sensing/lidar/right_upper/outlier_filtered/pointcloud",
#"/sensing/lidar/right_lower/outlier_filtered/pointcloud",
#"/sensing/lidar/rear_upper/outlier_filtered/pointcloud",
"/sensing/lidar/rear_lower/outlier_filtered/pointcloud",
],
#"input_offset": [0.025, 0.025, 0.01, 0.0, 0.05, 0.05, 0.05, 0.05], # all
"input_offset": [0.025, 0.01, 0.05, 0.05], # front_lower, left_upper, right_upper, rear_lower
# "input_offset": [0.01, 0.05], # left_upper, right_upper
"timeout_sec": 0.075,
"output_frame": LaunchConfiguration("base_frame"),
"input_twist_topic_type": "twist",
Expand All @@ -62,7 +95,7 @@ def launch_setup(context, *args, **kwargs):
namespace="",
package="rclcpp_components",
executable=LaunchConfiguration("container_executable"),
composable_node_descriptions=[],
composable_node_descriptions=[perception_concat_component, localization_concat_component],
condition=UnlessCondition(LaunchConfiguration("use_pointcloud_container")),
output="screen",
)
Expand All @@ -75,7 +108,7 @@ def launch_setup(context, *args, **kwargs):

# load concat or passthrough filter
concat_loader = LoadComposableNodes(
composable_node_descriptions=[concat_component],
composable_node_descriptions=[perception_concat_component, localization_concat_component],
target_container=target_container,
condition=IfCondition(LaunchConfiguration("use_concat_filter")),
)
Expand Down

0 comments on commit f57251f

Please sign in to comment.