|
| 1 | +# Perception Launch Files |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The Autoware perception stacks start |
| 6 | +launching at `autoware_launch.xml` as we mentioned at [Launch Autoware](../index.md) page. |
| 7 | +The `autoware_launch` package includes `tier4_perception_component.launch.xml` |
| 8 | +for starting perception launch files invocation from `autoware_launch.xml`. |
| 9 | +This diagram describes some of the Autoware perception launch files flow at `autoware_launch` and `autoware.universe` packages. |
| 10 | + |
| 11 | +<figure markdown> |
| 12 | + { align=center } |
| 13 | + <figcaption> |
| 14 | + Autoware perception launch flow diagram |
| 15 | + </figcaption> |
| 16 | +</figure> |
| 17 | + |
| 18 | +The Autoware project is large. Therefore, as we manage the Autoware project, we utilize specific |
| 19 | +arguments in the launch files. ROS 2 offers an argument-overriding feature for these launch files. |
| 20 | +Please refer to [the official ROS 2 launch documentation](https://docs.ros.org/en/humble/Tutorials/Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.html#parameter-overrides) for further information. For instance, |
| 21 | +if we define an argument at the top-level launch, it will override the value on lower-level launches. |
| 22 | + |
| 23 | +## tier4_perception_component.launch.xml |
| 24 | + |
| 25 | +The `tier4_perception_component.launch.xml` launch file is the main perception component launch at the `autoware_launch` package. |
| 26 | +This launch file calls `perception.launch.xml` at [tier4_perception_launch](https://github.com/autowarefoundation/autoware.universe/tree/main/launch/tier4_perception_launch) package from `autoware.universe` repository. |
| 27 | +We can modify perception launch arguments at tier4_perception_component.launch.xml. |
| 28 | +Also, |
| 29 | +we can add any other necessary arguments |
| 30 | +that we want |
| 31 | +to change it since `tier4_perception_component.launch.xml` is the top-level launch file of other perception launch files. |
| 32 | +Here are some predefined perception launch arguments: |
| 33 | + |
| 34 | +- **occupancy_grid_map_method:** This parameter determines the occupancy grid map method for perception stack. Please check [probabilistic_occupancy_grid_map](https://autowarefoundation.github.io/autoware.universe/main/perception/probabilistic_occupancy_grid_map/) package for detailed information. |
| 35 | + The default probabilistic occupancy grid map method is `pointcloud_based_occupancy_grid_map`. |
| 36 | + If you want to change it to the `laserscan_based_occupancy_grid_map`, you can change it here: |
| 37 | + |
| 38 | + ```diff |
| 39 | + - <arg name="occupancy_grid_map_method" default="pointcloud_based_occupancy_grid_map" description="options: pointcloud_based_occupancy_grid_map, laserscan_based_occupancy_grid_map"/> |
| 40 | + + <arg name="occupancy_grid_map_method" default="laserscan_based_occupancy_grid_map" description="options: pointcloud_based_occupancy_grid_map, laserscan_based_occupancy_grid_map"/> |
| 41 | + ``` |
| 42 | + |
| 43 | +- **detected_objects_filter_method:** This parameter determines the filter method for detected objects. |
| 44 | + Please check [detected_object_validation](https://autowarefoundation.github.io/autoware.universe/main/perception/detected_object_validation/) package for detailed information about lanelet and position filter. |
| 45 | + The default detected object filter method is `lanelet_filter`. |
| 46 | + If you want to change it to the `position_filter`, you can change it here: |
| 47 | + |
| 48 | + ```diff |
| 49 | + - <arg name="detected_objects_filter_method" default="lanelet_filter" description="options: lanelet_filter, position_filter"/> |
| 50 | + + <arg name="detected_objects_filter_method" default="position_filter" description="options: lanelet_filter, position_filter"/> |
| 51 | + ``` |
| 52 | + |
| 53 | +- **detected_objects_validation_method:** This parameter determines the validation method for detected objects. |
| 54 | + Please check [detected_object_validation](https://autowarefoundation.github.io/autoware.universe/main/perception/detected_object_validation/) package for detailed information about validation methods. |
| 55 | + The default detected object filter method is `obstacle_pointcloud`. |
| 56 | + If you want to change it to the `occupancy_grid`, you can change it here, |
| 57 | + but remember it requires `laserscan_based_occupancy_grid_map` method as `occupancy_grid_map_method`: |
| 58 | + |
| 59 | + ```diff |
| 60 | + - <arg name="occupancy_grid_map_method" default="pointcloud_based_occupancy_grid_map" description="options: pointcloud_based_occupancy_grid_map, laserscan_based_occupancy_grid_map"/> |
| 61 | + + <arg name="occupancy_grid_map_method" default="laserscan_based_occupancy_grid_map" description="options: pointcloud_based_occupancy_grid_map, laserscan_based_occupancy_grid_map"/> |
| 62 | + <arg |
| 63 | + name="detected_objects_validation_method" |
| 64 | + - default="obstacle_pointcloud" |
| 65 | + + default="occupancy_grid" |
| 66 | + description="options: obstacle_pointcloud, occupancy_grid (occupancy_grid_map_method must be laserscan_based_occupancy_grid_map)" |
| 67 | + /> |
| 68 | + ``` |
| 69 | + |
| 70 | +The predefined `tier4_perception_component.launch.xml` arguments explained above, |
| 71 | +but there is the lot of perception arguments |
| 72 | +included in `perception.launch.xml` at [tier4_perception_launch](https://github.com/autowarefoundation/autoware.universe/tree/main/launch/tier4_perception_launch). |
| 73 | +Since we didn't fork `autoware.universe` repository, |
| 74 | +we can add the necessary launch argument to tier4_perception_component.launch.xml file. |
| 75 | +Please follow the guidelines for some examples. |
| 76 | + |
| 77 | +## perception.launch.xml |
| 78 | + |
| 79 | +The `perception.launch.xml` launch file is the main perception launch at the `autoware.universe`. |
| 80 | +This launch file calls necessary perception launch files |
| 81 | +as we mentioned [`Autoware perception launch flow diagram`](#overview) above. |
| 82 | +The top-level launch file of `perception.launch.xml` is `tier4_perception_component.launch.xml`, |
| 83 | +so if we want to change anything on `perception.launch.xml`, |
| 84 | +we will apply these changes `tier4_perception_component.launch.xml` instead of `perception.launch.xml`. |
| 85 | + |
| 86 | +Here are some example changes for the perception pipeline: |
| 87 | + |
| 88 | +- **remove_unknown:** This parameter determines the remove unknown objects at camera-lidar fusion. |
| 89 | + Please check [roi_cluster_fusion](https://github.com/autowarefoundation/autoware.universe/blob/main/perception/image_projection_based_fusion/docs/roi-cluster-fusion.md) node for detailed information. |
| 90 | + The default value is `true`. |
| 91 | + If you want to change it to the `false`, |
| 92 | + you can add this argument to `tier4_perception_component.launch.xml`, |
| 93 | + so it will override the `perception.launch.xml`'s `argument`: |
| 94 | + |
| 95 | + ```diff |
| 96 | + - <arg name="detected_objects_filter_method" default="lanelet_filter" description="options: lanelet_filter, position_filter"/> |
| 97 | + + <arg name="detected_objects_filter_method" default="position_filter" description="options: lanelet_filter, position_filter"/> |
| 98 | + ``` |
| 99 | + |
| 100 | +- **camera topics:** If you are using camera-lidar fusion or camera-lidar-radar fusion as a perception_mode, |
| 101 | + you can add your camera and info topics on `tier4_perception_component.launch.xml` as well, |
| 102 | + it will override the `perception.launch.xml` launch file arguments: |
| 103 | + |
| 104 | + ```diff |
| 105 | + + <arg name="image_raw0" default="/sensing/camera/camera0/image_rect_color" description="image raw topic name"/> |
| 106 | + + <arg name="camera_info0" default="/sensing/camera/camera0/camera_info" description="camera info topic name"/> |
| 107 | + + <arg name="detection_rois0" default="/perception/object_recognition/detection/rois0" description="detection rois output topic name"/> |
| 108 | + ... |
| 109 | + ``` |
| 110 | + |
| 111 | +You can add every necessary argument |
| 112 | +to `tier4_perception_component.launch.xml` launch file like these examples. |
0 commit comments