Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

multirobot tf tree

I was reading the ROS Best Practices page for the REP 105 regarding the coordinate frames in order to start building a multi-robot ready tf tree.

I would like to be able to launch two robots within the same roscore environment. This would imply some modifications to the standard tf tree proposed, for the need to distinguish between the frames of one robot from the other.

For what I have seen, one of the common ways to build the robot tf tree is through the URDF files. In there all robot frames are named. From here it comes my first question. As my two robots have exactly the same configuration I wanted to use the same urdf file, but that would duplicate the frame names. Do I have to create a different urdf file for each robot?

Assuming two robots, r1 and r2, then the final tf tree would look something like this:

                 /       \
     odom_r1    odom_r2
              |             |
base_link_r1    base_link_r2
              |             |
  sensors_r1    sensors_r2

I do not specially like this solution, but as the frame names must be unique I can not see a better one.

As I read in several anwsers the odometry node is supposed to send the transforms from odom to base_link, while a localization node would send the transforms from map to odom to correct the odometry drifting over time. In this "new" tf scheme this solution is still valid, the nodes would just require a parameter remapping to work with "odom_r1" instead of just "odom".

I just wanted to be sure my assumptions are coherent with the ROS directions before starting the whole implementation.