Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to make sure you have fixed joints in the URDF between the wheel frames and the robot base frame so that the wheels will move along with the base. If you do that, then updates to the robot position will cause simultaneous updates to the wheel frame positions. Something like this:

<link name="base_link"> ... </link>
<link name="left_wheel_link"> ... </link>
<joint name="base_to_left_wheel" type="fixed">
    <parent link="base_link" />
    <child link="left_wheel_link" />
    <origin xyz="0.0 -0.1 -0.02" />
</joint>

This places the left wheel frame 100mm to the left of robot center and 20mm down (-Z). Similar for the right wheel. Note that by convention the base_link frame has the X axis pointing straight ahead, the Y axis pointing to the left of the robot, and the Z axis pointing up.

You might also need the "rpy=" attribute to <origin> if you need the wheel frame orientation to be different than base_link. (Often not needed for fixed frames which are not sensor locations.)