Skip to content

Localization#

This page describes the interface of the Localization component. See the Localization component design for the concepts.

The Localization component estimates the pose, the velocity, and the acceleration of the vehicle. The diagram shows the default setup of autoware_launch: the ndt pose source and the gyro_odom twist source. Other pose sources are YabLoc, Eagleye, AR tags, and LiDAR markers.

In the default Localization setup, the NDT scan matcher matches the LiDAR point cloud to the point cloud map, with the EKF pose as its initial guess, and the gyro odometer combines the IMU and the vehicle twist. The EKF localizer fuses both, and the stop filter outputs the kinematic state to Planning, Control, and other components. Twist to acceleration outputs the acceleration, the localization error monitor reports diagnostics, and the EKF localizer publishes the map to base_link transform. The pose initializer gives the first pose when the AD API requests initialization.MapSensingAD APILocalizationNDT scan matcherGyro odometerPose initializerEKF localizerTwist to accelerationStop filterLocalization error monitorPoint cloud mapLiDAR point cloudIMU, vehicle twistGNSS poseInitializePoseInitial guessTwistInitial pose/localization/kinematic_state/localization/acceleration/diagnostics/tfPlanning, Control, and other componentsSystemDiagnostic graphTF treemap → base_link
The main nodes and data flows of the Localization component in the default setup.

The pose initializer also calls the NDT scan matcher to align the first pose with the point cloud map.

Inputs#

NameTopic or serviceTypeDescription
Point cloud map/map/get_differential_pointcloud_map (service)autoware_map_msgs/srv/GetDifferentialPointCloudMapThe NDT scan matcher loads the map areas around the vehicle. See the outputs of Map.
Point cloud map/map/get_partial_pointcloud_map (service)autoware_map_msgs/srv/GetPartialPointCloudMapThe pose initializer uses the map to fit the height of a GNSS pose. If the map loader does not enable partial loading, it uses the /map/pointcloud_map topic instead.
LiDAR point cloud/sensing/lidar/concatenated/pointcloudsensor_msgs/msg/PointCloud2The point cloud for NDT matching. It must first go through the point cloud preprocessing. Localization then crops and downsamples it again.
GNSS pose/sensing/gnss/pose_with_covariancegeometry_msgs/msg/PoseWithCovarianceStampedThe pose from GNSS. The pose initializer uses it for automatic initialization, and the NDT scan matcher can use it for regularization.
IMU data/sensing/imu/imu_datasensor_msgs/msg/ImuThe angular velocity of the vehicle, after the IMU corrector.
Vehicle twist/sensing/vehicle_velocity_converter/twist_with_covariancegeometry_msgs/msg/TwistWithCovarianceStampedThe velocity of the vehicle. autoware_vehicle_velocity_converter makes it from /vehicle/status/velocity_status (autoware_vehicle_msgs/msg/VelocityReport).
Initialize/localization/initialize (service)autoware_localization_msgs/srv/InitializeLocalizationA request to initialize the pose. The AUTO method aligns the given pose with the NDT scan matcher. If no pose is given, it uses the GNSS pose. The DIRECT method uses the given pose as it is. The AD API calls this service.

The GNSS pose comes from the Sensing component. Its gnss_poser node makes it from the GNSS position (sensor_msgs/msg/NavSatFix) and the GNSS-INS orientation (autoware_sensing_msgs/msg/GnssInsOrientationStamped). See Sensing.

In RViz, the 2D Pose Estimate tool publishes /initialpose. The initial pose adaptor of autoware_adapi_adaptors turns it into a call of the AD API /api/localization/initialize. The AD API then calls /localization/initialize.

Outputs#

NameTopicTypeDescription
Vehicle kinematic state/localization/kinematic_statenav_msgs/msg/OdometryThe current pose and twist of the vehicle. Planning, Control, Perception, and others use it.
Vehicle acceleration/localization/accelerationgeometry_msgs/msg/AccelWithCovarianceStampedThe current acceleration of the vehicle, from the autoware_twist2accel node.
Vehicle pose/localization/pose_with_covariancegeometry_msgs/msg/PoseWithCovarianceStampedThe current pose of the vehicle, from the EKF localizer.
Vehicle twist/localization/pose_twist_fusion_filter/twist_with_covariancegeometry_msgs/msg/TwistWithCovarianceStampedThe current twist of the vehicle, from the EKF localizer.
Transform/tftf2_msgs/msg/TFMessageThe transform from map to base_link.
Initialization state/localization/initialization_stateautoware_adapi_v1_msgs/msg/LocalizationInitializationStateThe state of the pose initialization.
Localization accuracy/diagnosticsdiagnostic_msgs/msg/DiagnosticArrayThe autoware_localization_error_monitor node reports when the error ellipse of the pose is too large.

Use /localization/kinematic_state for the pose and the velocity of the vehicle. The autoware_localization_msgs/msg/KinematicState message holds a pose, a twist, and an acceleration in one message, but no node in the default setup publishes it.