Skip to content

Initialize the pose#

Autoware needs a global pose as the initial guess for localization. The application gives this pose with the localization API, or it lets Autoware use the GNSS pose.

Sequence#

Initialize the pose with an input pose#

The user gives the pose, for example in a GUI. The application puts the pose in the request. RViz uses this method: initial_pose_adaptor in autoware_adapi_adaptors converts the /initialpose topic to an API call.

The user gives a pose in the GUI. The application calls the localization initialize API with that pose, and AD API forwards the request to Autoware.GUIApplicationAD APIAutowarepose/api/localization/initialize (pose)initialize the poseINITIALIZING/api/localization/initialization_stateINITIALIZED or UNINITIALIZED/api/localization/initialization_stateresponse statusresponse status
Initialize the pose with a pose from the user.

Initialize the pose with GNSS#

The application sends the request with an empty pose array. Autoware then uses the latest GNSS pose as the initial guess. This method needs a GNSS receiver.

The application calls the localization initialize API without a pose. Autoware uses the latest GNSS pose as the initial guess.ApplicationAD APIAutowareGNSSpose/api/localization/initialize (no pose)initialize the poseINITIALIZING/api/localization/initialization_stateuse the GNSS poseINITIALIZED or UNINITIALIZED/api/localization/initialization_stateresponse statusresponse status
Initialize the pose with the GNSS pose.

Notes#

  • In both methods, Autoware refines the initial guess with the pose estimator (NDT or YabLoc) if one is enabled.
  • The request fails with ERROR_UNSAFE if the vehicle is not stopped, when the stop check of autoware_pose_initializer is enabled.
  • If the initialization fails, the state changes to UNINITIALIZED. Send the request again.