Search code examples
ros

ROS Odometry message: what are the source and target frames of the pose?


The ROS odometry message contais a pose and a twist.

The twist is described in the child_frame_id. What are the source and target frames of the pose? I assume that the pose is meant to transform between the header.frame_id and the child_frame_id (which does not necessarily need to be base_link).


Solution

  • I could not find a clear definition to answer the question. However, if the pose was defined between the header.frame_id and base_link, the message could be split into two messages (pose and twist). To make sense of having both pose and twist in the message, I think that the pose shall be interpreted between the header.frame_id and the child_frame_id of the message.

    It even seems that it's wanted to be undefined. The popular robot-localization package is about to interpret the message depending on the current situtation. For sensor_msgs/Imu messages, a similar case is true, as the navsat_transform node and the ekf/ukf nodes interpret the header.frame_id completely different.

    Update: An ongoing pull request leaves the answer of this particular question to the user who will be able to decide based on a parameter.