Ask Your Question

Revision history [back]

Hi,

I've been working on this also, but It's quite cumbersome.

As far as I know, the tb3 models are spawned as .sdf models directly on the turtlebot3_gazebo world files () whereas the tf is created by a robot publisher that uses a urdf on the trutlebot_description

What I've done is the following:

  • Create copies of the tb3 models with a different name (I.e tb_1_burger, tb_2_buger)

  • Edit the model.sdf files on the new copies by adding the namespace tags according.

  • Edit the world file that you are launching to add the new models.

At this point you will have the two robots on gazebo, but the tf tree will be duplicated, so now it's time to edit the .urdf. For this it's possible to create a .xacro file, but depending on which ros2 version you are using that can change quite a lot. So a long and boring way to do this is to

  • Create copies of the .urdf files for the new robots/models. You can find them in the turtlebot_description/urdf and there you need to manually change the links, joints to include the prefix.

  • Finally, you need to update the robot_state_publisher.launch to launch the different .urdf files you just created.

At this point, the multiple tb3 models should work, but it may still be some issues I haven't detected yet.

Hope this helps!

Mario