ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It depends what you mean by "the odometry for the front wheel". An odometry message usually has robot pose data in the world frame and robot twist data in the base_link frame. If you have the robot's velocities (including kinematic constraints) in a different coordinate system, the transform tree will take care of the shift and rotation from one frame to another. However, that only applies in an instantaneous coordinate-change sense. Such transformations don't take into account any kinematic constraints (wheel radius, steering geometry, etc.), so if you start with the twist components of the front wheel in the front_wheel frame, you'll end up with the twist of the front wheel--not the twist of the robot--in the base_link frame. If you start with the twist of the robot in the front_wheel frame, the transform will correctly give you the twist of the robot in the base_link frame.

That said, tricycle kinematic equations for the robot (base_link) frame are known, so why not use them? Here's one example of the derivation (pgs. 14-15).