Skip to content

Commit

Permalink
Merge pull request autowarefoundation#764 from tier4/hotfix/perceptio…
Browse files Browse the repository at this point in the history
…n/refactor_pointcloud_container

feat(perception): refactor pointcloud container
  • Loading branch information
shmpwk authored Feb 2, 2024
2 parents fa9eb67 + b7bc839 commit 4759291
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
max_area_matrix:
#UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE, PEDESTRIAN
[ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #UNKNOWN
0.000, 0.000, 36.000, 0.000, inf, 0.000, 0.000, 0.000, #CAR
0.000, 0.000, 0.000, 0.000, inf, 0.000, 0.000, 0.000, #TRUCK
0.000, 0.000, 0.000, 0.000, inf, 0.000, 0.000, 0.000, #BUS
0.000, 0.000, 36.000, 0.000, 999.999, 0.000, 0.000, 0.000, #CAR
0.000, 0.000, 0.000, 0.000, 999.999, 0.000, 0.000, 0.000, #TRUCK
0.000, 0.000, 0.000, 0.000, 999.999, 0.000, 0.000, 0.000, #BUS
0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #TRAILER
0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #MOTORBIKE
0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #BICYCLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
<arg name="pose_source" default="ndt" description="select pose_estimator: ndt, yabloc, eagleye"/>
<arg name="twist_source" default="gyro_odom" description="select twist_estimator. gyro_odom, eagleye"/>
<arg name="input_pointcloud" default="/sensing/lidar/top/pointcloud" description="The topic will be used in the localization util module"/>
<arg
name="lidar_container_name"
default="/sensing/lidar/top/pointcloud_preprocessor/pointcloud_container"
description="The target container to which lidar preprocessing nodes in localization be attached"
/>

<group>
<include file="$(find-pkg-share tier4_localization_launch)/launch/localization.launch.xml">
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="/sensing/lidar/top/pointcloud_preprocessor/pointcloud_container"/>
<arg name="pose_source" value="$(var pose_source)"/>
<arg name="twist_source" value="$(var twist_source)"/>
<arg name="system_run_mode" value="$(var system_run_mode)"/>
<arg name="input_pointcloud" value="$(var input_pointcloud)"/>
<arg name="lidar_container_name" value="$(var lidar_container_name)"/>

<!-- parameter paths for common -->
<arg name="crop_box_filter_measurement_range_param_path" value="$(var loc_config_path)/crop_box_filter_measurement_range.param.yaml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<include file="$(find-pkg-share tier4_perception_launch)/launch/perception.launch.xml">
<arg name="mode" value="$(var perception_mode)"/>
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="enable_fine_detection" value="$(var traffic_light_recognition/enable_fine_detection)"/>
<arg name="occupancy_grid_map_method" value="$(var occupancy_grid_map_method)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
<arg name="vehicle_mirror_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/mirror.param.yaml"/>
<arg name="use_pointcloud_container" value="false"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
</include>
</launch>
12 changes: 10 additions & 2 deletions autoware_launch/launch/pointcloud_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode


def generate_launch_description():
Expand All @@ -37,13 +38,20 @@ def add_launch_arg(name: str, default_value=None):
condition=IfCondition(LaunchConfiguration("use_multithread")),
)

glog_component = ComposableNode(
package="glog_component",
plugin="GlogComponent",
name="glog_component",
namespace="pointcloud_container",
)

pointcloud_container = ComposableNodeContainer(
name=LaunchConfiguration("container_name"),
namespace="/",
package="rclcpp_components",
executable=LaunchConfiguration("container_executable"),
composable_node_descriptions=[],
output="screen",
composable_node_descriptions=[glog_component],
output="both",
)

return LaunchDescription(
Expand Down

0 comments on commit 4759291

Please sign in to comment.