Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In your use case, it's easy to get the two confused. But consider a multi-DOF arm.

The urdf describes all the things about the arm that don't change: how long the links are, where the joints are in reference to the link, how the joints can move. None of this depends on where the arm is in 3d space.

tf is a library to keep track of where the arm is in 3d space. It gives you the relative position of from one frame to another. If you look up the tf from your base to the end effector, then move the shoulder joint of the arm, then look up the tf again, it will now reflect the new relative position of your end effector. The urdf hasn't changed, though, because the arm is still the same arm.

Typically there will be a robot_state_publisher node that looks at the urdf of your robot and a message of all its joint states. It then calculates where each link of your robot is and broadcasts that to the rest of the network.

urdf is also used for calculating inverse kinematics.

If the joints between the links of your robot can't move, then the tf is static. Frequently, though, tf is dynamic. urdf is always static.