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(update): update lidar pointcloud interface and concatenate pointcloud filter #215

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 2 additions & 2 deletions aip_x1_launch/launch/new_livox_horizon.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ def get_crop_box_min_range_component(context, livox_frame_id):
name="crop_box_filter_min_range",
remappings=[
("input", "livox/tag_filtered/lidar" if use_tag_filter else "livox/lidar"),
("output", "min_range_cropped/pointcloud"),
("output", "min_range_cropped/pointcloud_before_sync"),
],
parameters=[
{
"input_frame": livox_frame_id,
"output_frame": LaunchConfiguration("base_frame"),
"output_frame": LaunchConfiguration("frame_id"),
"min_x": 0.0,
"max_x": LaunchConfiguration("min_range"),
"min_y": -2.0,
Expand Down
9 changes: 5 additions & 4 deletions aip_x1_launch/launch/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ def launch_setup(context, *args, **kwargs):
parameters=[
{
"input_topics": [
"/sensing/lidar/top/pointcloud",
"/sensing/lidar/front_left/min_range_cropped/pointcloud",
"/sensing/lidar/front_right/min_range_cropped/pointcloud",
"/sensing/lidar/front_center/min_range_cropped/pointcloud",
"/sensing/lidar/top/pointcloud_before_sync",
"/sensing/lidar/front_left/min_range_cropped/pointcloud_before_sync",
"/sensing/lidar/front_right/min_range_cropped/pointcloud_before_sync",
"/sensing/lidar/front_center/min_range_cropped/pointcloud_before_sync",
],
"output_frame": LaunchConfiguration("base_frame"),
"timeout_sec": 1.0,
"input_twist_topic_type": "twist",
"publish_synchronized_pointcloud": True,
}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
Expand Down
11 changes: 10 additions & 1 deletion aip_x1_launch/launch/velodyne_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,23 @@
)
)

# Ring Outlier Filter is the last component in the pipeline, so control the output frame here
if LaunchConfiguration("output_as_sensor_frame").perform(context):
ring_outlier_filter_parameters = {"output_frame": LaunchConfiguration("frame_id")}
else:
ring_outlier_filter_parameters = {
"output_frame": ""
} # keep the output frame as the input frame
nodes.append(
ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::RingOutlierFilterComponent",
name="ring_outlier_filter",
remappings=[
("input", "rectified/pointcloud_ex"),
("output", "pointcloud"),
("output", "pointcloud_before_sync"),
],
parameters=[ring_outlier_filter_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)
Expand Down Expand Up @@ -217,7 +225,8 @@
"vehicle_mirror_param_file", description="path to the file of vehicle mirror position yaml"
)
add_launch_arg("use_multithread", "False", "use multithread")
add_launch_arg("use_intra_process", "False", "use ROS2 component container communication")

Check warning on line 228 in aip_x1_launch/launch/velodyne_node_container.launch.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (ROS2)
add_launch_arg("output_as_sensor_frame", "True", "output final pointcloud in sensor frame")

set_container_executable = SetLaunchConfiguration(
"container_executable",
Expand Down
11 changes: 10 additions & 1 deletion aip_x2_launch/launch/pandar_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,22 @@ def create_parameter_dict(*args):
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

# Ring Outlier Filter is the last component in the pipeline, so control the output frame here
if LaunchConfiguration("output_as_sensor_frame").perform(context):
ring_outlier_filter_parameters = {"output_frame": LaunchConfiguration("frame_id")}
else:
ring_outlier_filter_parameters = {
"output_frame": ""
} # keep the output frame as the input frame
ring_outlier_filter_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::RingOutlierFilterComponent",
name="ring_outlier_filter",
remappings=[
("input", "rectified/pointcloud_ex"),
("output", "pointcloud"),
("output", "pointcloud_before_sync"),
],
parameters=[ring_outlier_filter_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

Expand Down Expand Up @@ -336,6 +344,7 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("min_azimuth_deg", "135.0")
add_launch_arg("max_azimuth_deg", "225.0")
add_launch_arg("enable_blockage_diag", "true")
add_launch_arg("output_as_sensor_frame", "True")
set_container_executable = SetLaunchConfiguration(
"container_executable",
"component_container",
Expand Down
17 changes: 9 additions & 8 deletions aip_x2_launch/launch/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,20 @@ def launch_setup(context, *args, **kwargs):
parameters=[
{
"input_topics": [
"/sensing/lidar/front_upper/pointcloud",
"/sensing/lidar/front_lower/pointcloud",
"/sensing/lidar/left_upper/pointcloud",
"/sensing/lidar/left_lower/pointcloud",
"/sensing/lidar/right_upper/pointcloud",
"/sensing/lidar/right_lower/pointcloud",
"/sensing/lidar/rear_upper/pointcloud",
"/sensing/lidar/rear_lower/pointcloud",
"/sensing/lidar/front_upper/pointcloud_before_sync",
"/sensing/lidar/front_lower/pointcloud_before_sync",
"/sensing/lidar/left_upper/pointcloud_before_sync",
"/sensing/lidar/left_lower/pointcloud_before_sync",
"/sensing/lidar/right_upper/pointcloud_before_sync",
"/sensing/lidar/right_lower/pointcloud_before_sync",
"/sensing/lidar/rear_upper/pointcloud_before_sync",
"/sensing/lidar/rear_lower/pointcloud_before_sync",
],
"input_offset": [0.025, 0.025, 0.01, 0.0, 0.05, 0.05, 0.05, 0.05],
"timeout_sec": 0.075,
"output_frame": LaunchConfiguration("base_frame"),
"input_twist_topic_type": "twist",
"publish_synchronized_pointcloud": True,
}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
Expand Down
9 changes: 5 additions & 4 deletions aip_xx1_launch/launch/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def launch_setup(context, *args, **kwargs):
parameters=[
{
"input_topics": [
"/sensing/lidar/top/pointcloud",
"/sensing/lidar/left/pointcloud",
"/sensing/lidar/right/pointcloud",
"/sensing/lidar/rear/pointcloud",
"/sensing/lidar/top/pointcloud_before_sync",
"/sensing/lidar/left/pointcloud_before_sync",
"/sensing/lidar/right/pointcloud_before_sync",
"/sensing/lidar/rear/pointcloud_before_sync",
],
"output_frame": LaunchConfiguration("base_frame"),
"input_offset": [
Expand All @@ -51,6 +51,7 @@ def launch_setup(context, *args, **kwargs):
], # each sensor will wait 60, 70, 70, 70ms
"timeout_sec": 0.095, # set shorter than 100ms
"input_twist_topic_type": "twist",
"publish_synchronized_pointcloud": True,
}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
Expand Down
11 changes: 10 additions & 1 deletion common_sensor_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,23 @@ def create_parameter_dict(*args):
)
)

# Ring Outlier Filter is the last component in the pipeline, so control the output frame here
if LaunchConfiguration("output_as_sensor_frame").perform(context):
ring_outlier_filter_parameters = {"output_frame": LaunchConfiguration("frame_id")}
else:
ring_outlier_filter_parameters = {
"output_frame": ""
} # keep the output frame as the input frame
nodes.append(
ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::RingOutlierFilterComponent",
name="ring_outlier_filter",
remappings=[
("input", "rectified/pointcloud_ex"),
("output", "pointcloud"),
("output", "pointcloud_before_sync"),
],
parameters=[ring_outlier_filter_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)
Expand Down Expand Up @@ -283,6 +291,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("container_name", "nebula_node_container")
add_launch_arg("output_as_sensor_frame", "True", "output final pointcloud in sensor frame")

set_container_executable = SetLaunchConfiguration(
"container_executable",
Expand Down
Loading