In order to make sense of a `geometry_msgs/Pose`

message, you need to know the *reference coordinate system* and the *intrinsic coordinate system*. These should be clear from the context in which the `Pose`

message is used. To specify the reference coordinate system, many ROS packages use the `frame_id`

field of `geometry_msgs/PoseStamped`

instead of using `Pose`

directly.

For example, robot_pose_ekf publishes the robot pose as `PoseStamped`

, where the reference coordinate system (the fixed world frame, if you like) is `odom_combined`

, and the intrinsic coordinate system of the robot is `base_link`

. As the document linked to by @dornhege points out, the default axis orientation for a body (e.g., a robot) is "x forward, y left, z up". So the interpretation of this particular Pose message is "rotate `base_link`

by the rotation given in the quaternion, relative to the `odom_combined`

frame".

More specifically, if I have a
orientation (w, x,y,z) in 3d to what
orientation this corresponds in 2d?

Generally: none. :-)

Ok, just being cheeky. In cases where a body can only move in 2D (like all the 2D navigation stuff), the rotation axis should be the z axis, since z is "up" (see above). Using the naming conventions from your link, that means that (n_x, n_y, n_z) = (0, 0, 1), so (x, y, z, w) = (0, 0, sin(theta/2), cos(theta/2)).