Launching multiple robots in gazebo by namespace

asked 2020-11-21 10:44:58 -0500

carlosg gravatar image

updated 2022-05-28 16:48:35 -0500

lucasw gravatar image


This question has been asked multiple times however I didn't find anything actual (e.g. tf_prefix is outdated and not needed to adjust anymore). I am trying to launch multiple robots under ROS melodic in Ubuntu 18.04 in the same gazebo environment by namespacing. I have a gazebo environment (empty_world) that is outside the namespaces and a moveit_config package that I launch inside namespace /robot1 by launching demo_gazebo.launch with this namespace. The gazebo.launch file inside the moveit package is adjusted so that it does not launch the environment or the ros_controllers launch file, just the spawn_model node is left inside. Now, the problem is that the moveit is looking for controllers inside namespace /robot1/robot/arm_controller while the controllers are launched within topics /robot1/arm_controller. I have set up the controllers following this, that is also where the second namespace robot comes from. Following this, worked for the demo_gazebo.launch file, so it is definitely something with the namespacing.

Any help is appreciated!

edit retag flag offensive close merge delete