RobotnikAutomation / rbkairos_sim

RB-Kairos ROS simulation packages
23 stars 8 forks source link

Multiple robots #15

Closed zeidk closed 2 years ago

zeidk commented 2 years ago

Hi, how to spawn multiple robots in the same environment? I am currently using roslaunch rbkairos_sim_bringup rbkairos_complete.launch launch_robot_b:=true and I have both robots in RViz and Gazebo. However, each robot has its own map frame robot_map and robot_b_map. Is there a way to have one common map frame for both robots? Should I do the remapping myself or is there an easy change that can be made in one of the launch files?

Thank you

zeidk commented 2 years ago

I just want to add that I'm using the github repositories and not the Debian ones.

alex-arnal commented 2 years ago

Hi, the simplest way to make the robots share the environment is creating a parent frame that points to the map frame of both robots.

As both robots are using the same map you can just create an static transform like this:

Once you have both robots connected, you should be capable to see the second robot in the TFs tree representation of the first robot in RVIZ. sharing_map

zeidk commented 2 years ago

Awesome! Thank you very much for the fast reply. Also, is there a more detailed documentation on this package? There are many arguments we can pass to the launch files. Some of these arguments are intuitive while others are not easy to guess.