|
| 1 | +# Localization methods |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The Autoware localization stacks start |
| 6 | +launching at `autoware_launch.xml` as we mentioned at [Launch Autoware](../index.md) page. |
| 7 | +The `autoware_launch` package includes `tier4_localization_component.launch.xml` |
| 8 | +for starting localization launch files invocation from `autoware_launch.xml`. |
| 9 | +This diagram describes some of the Autoware localization launch files flow at `autoware_launch` and `autoware.universe` packages. |
| 10 | + |
| 11 | +<figure markdown> |
| 12 | + { align=center } |
| 13 | + <figcaption> |
| 14 | + Autoware localization launch flow diagram |
| 15 | + </figcaption> |
| 16 | +</figure> |
| 17 | + |
| 18 | +The Autoware project is a large project. |
| 19 | +Therefore, as we manage the Autoware project, we utilize specific |
| 20 | +arguments in the launch files. |
| 21 | +ROS 2 offers an argument-overriding feature for these launch files. |
| 22 | +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. |
| 23 | +For instance, |
| 24 | +if we define an argument at the top-level launch, |
| 25 | +it will override the value on lower-level launches. |
| 26 | + |
| 27 | +## tier4_localization_component.launch.xml |
| 28 | + |
| 29 | +The `tier4_localization_component.launch.xml` launch file is the main localization component launch at the `autoware_launch` package. |
| 30 | +This launch file calls `localization.launch.xml` at [tier4_localization_launch](https://github.com/autowarefoundation/autoware.universe/tree/main/launch/tier4_localization_launch) package from `autoware.universe` repository. |
| 31 | +We can modify perception launch arguments at tier4_perception_component.launch.xml. |
| 32 | + |
| 33 | +The current localization launcher implemented by TIER IV supports multiple localization methods, both pose estimators and twist estimators. |
| 34 | +`tier4_localization_component.launch.xml` has two arguments to select which estimators to launch: |
| 35 | + |
| 36 | +- **`pose_source:`** This argument specifies the pose_estimator, currently supporting `ndt` (default), `yabloc`, `artag` and `eagleye` for localization. |
| 37 | + By default, Autoware launches [ndt_scan_matcher](https://github.com/autowarefoundation/autoware.universe/tree/main/localization/ndt_scan_matcher) for pose estimator. |
| 38 | + You can use YabLoc as a camera-based localization method. |
| 39 | + For more details on YabLoc, |
| 40 | + please refer to the [README of YabLoc](https://github.com/autowarefoundation/autoware.universe/blob/main/localization/yabloc/README.md) in autoware.universe. |
| 41 | + Also, you can use Eagleye as a GNSS & IMU & wheel odometry-based localization method. For more details on Eagleye, please refer to the [Eagleye](./eagleye). |
| 42 | + |
| 43 | + You can set `pose_source` argument on `tier4_localization_component.launch.xml`, |
| 44 | + for example, if you want to use eagleye as pose_source, |
| 45 | + you need to update `tier4_localization_component.launch.xml` like: |
| 46 | + |
| 47 | + ```diff |
| 48 | + - <arg name="pose_source" default="ndt" description="select pose_estimator: ndt, yabloc, eagleye"/> |
| 49 | + + <arg name="pose_source" default="eagleye" description="select pose_estimator: ndt, yabloc, eagleye"/> |
| 50 | + ``` |
| 51 | + |
| 52 | + Also, you can use command-line for overriding launch arguments: |
| 53 | + |
| 54 | + ```bash |
| 55 | + ros2 launch autoware_launch autoware.launch.xml ... pose_source:=eagleye |
| 56 | + ``` |
| 57 | + |
| 58 | +- **`twist_source:`** This argument specifies the twist_estimator, currently supporting `gyro_odom` (default), and `eagleye`. |
| 59 | + By default, |
| 60 | + Autoware launches [gyro_odometer](https://github.com/autowarefoundation/autoware.universe/tree/main/localization/gyro_odometer) for twist estimator. |
| 61 | + Also, you can use eagleye for the twist source, please refer to the [Eagleye](./eagleye). |
| 62 | + If you want to change your twist source to eagleye, you can update `tier4_localization_component.launch.xml` like: |
| 63 | + |
| 64 | + ```diff |
| 65 | + - <arg name="twist_source" default="gyro_odom" description="select twist_estimator. gyro_odom, eagleye"/> |
| 66 | + + <arg name="twist_source" default="eagleye" description="select twist_estimator. gyro_odom, eagleye"/> |
| 67 | + ``` |
| 68 | + |
| 69 | + Or you can use command-line for overriding launch arguments: |
| 70 | + |
| 71 | + ```bash |
| 72 | + ros2 launch autoware_launch autoware.launch.xml ... twist_source:=eagleye |
| 73 | + ``` |
| 74 | + |
| 75 | +- **`input_pointcloud:`** This argument specifies the input pointcloud of the localization pointcloud pipeline. The default value is |
| 76 | + `/sensing/lidar/top/outlier_filtered/pointcloud` which |
| 77 | + is output of the [pointcloud pre-processing](https://autowarefoundation.github.io/autoware.universe/main/sensing/pointcloud_preprocessor/) pipeline from sensing. |
| 78 | + You can change this value according to your LiDAR topic name, |
| 79 | + or you can choose to use concatenated point cloud: |
| 80 | + |
| 81 | + ```diff |
| 82 | + - <arg name="input_pointcloud" default="/sensing/lidar/top/outlier_filtered/pointcloud" description="The topic will be used in the localization util module"/> |
| 83 | + + <arg name="input_pointcloud" default="/sensing/lidar/concatenated/pointcloud"/> |
| 84 | + ``` |
| 85 | + |
| 86 | +You can add every necessary argument |
| 87 | +to `tier4_localization_component.launch.xml` launch file like these examples. |
| 88 | +In case, if you want to change your gyro odometer twist input topic, |
| 89 | +you can add this argument on `tier4_localization_component.launch.xml` launch file: |
| 90 | + |
| 91 | +```diff |
| 92 | ++ <arg name="input_vehicle_twist_with_covariance_topic" value="<YOUR-VEHICLE-TWIST-TOPIC-NAME>"/> |
| 93 | +``` |
| 94 | + |
| 95 | +**Note:** Gyro odometer input topic provided from velocity converter package. This package will be launched at sensor_kit. For more information, |
| 96 | +please check [velocity converter package](https://github.com/autowarefoundation/autoware.universe/tree/main/sensing/vehicle_velocity_converter). |
0 commit comments