Init world pose


There are times when the world origin of a map is not in the upper left corner, in these cases we would like to init the world frame to a given 2d pose (im guessing by using pose init, but pose init requirese two poses for a transform, this did not work). how can this be done?


You can use the PoseInitializer component and set up the parameters:

  • lhs_frame: “world”
  • rhs_frame: “map”
  • pose: some Pose3d described as: [qw, qx, qy, qz, tx, ty, tz] where q is the quaternion of the transformation and t is the translation.

Example of configuration that will offset the map by 30m in X and 20m in Y:

“config”: {
“Map”: {
“PoseInitializer”: {
“lhs_frame”: “world”,
“rhs_frame”: “map”,
“pose”: [1, 0, 0, 0, 30, 20, 0]

For a 2D pose, use the quaternion [cos(alpha/2), 0, 0, sin(alpha/2)]

I hope it helps.