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:
/ <br> odom_r1 odom_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.
Post score: 5
Comment by hsu on 2011-08-24:
there is a multi_robot_test.launch file I played around with and mentioned in http://answers.ros.org/question/1826/how-to-import-two-pr2-on-gazebo-at-the-same-time