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

Understanding TF, URDF and Static_transform_publisher

asked 2015-06-30 02:45:41 -0500

miguel gravatar image

I Am struggling to understand where TF and URDF fit it. Also, while consulting the tutorial on costmap_2d I came across the static_transform_publisher which is confusing me as well.

Firstly, I am trying to produce a 2d map of an environment on ROS (indigo). I am planning on using the range_sensor_layer as a costmap_2d plugin to enable the use of Sonar sensors.

I understand that a URDF places all the robot components in perspective, for example my sensors are placed in the front of the robot each 45 degrees apart, and a URDF allows me to "place" these sensors i.e Tell ROS how they are placed.

Now where does TF come into play (I understand it is the transform from my robot base (base_link) and the so called laser scan), Do I need both TF and URDF and how do they link?

Also with reference to the costmap_2d tutorial and the static_transform_publisher, it says that a static transform publisher tells the package the transformation from the /map and the base_link, what would this be? Is it the TF or an addition to the TF?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-30 08:45:58 -0500

thebyohazard gravatar image

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.

edit flag offensive delete link more



I see, thank you my understanding is slowly coming together, it gets quite overwhelming haha. Thank you for your response!

miguel gravatar image miguel  ( 2015-06-30 09:01:35 -0500 )edit

Question Tools



Asked: 2015-06-30 02:45:41 -0500

Seen: 5,710 times

Last updated: Jun 30 '15