Home | Tutorials | Wiki | Issues
Ask Your Question

Gazebo not publishing joint_state topic

asked 2018-12-24 10:40:18 -0600

mvish7 gravatar image

Hello, I want to spwan panda robot in gazebo. For that i have made following files:

  1. Here is the launch file for launching gazebo.

  2. Here is the launch file for launching controllers

  3. Here and here are the controllers i have defined.

  4. Here is the robot URDF (generated from moveit setup assistant )

when i launch the panda.launch file(to launch gazebo and controllers) robot is getting spawned in gazebo. When and run rosnode info gazebo command gazebo doesn't seem to be publishing joint_state topic.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-12-26 16:26:29 -0600

azeey gravatar image

I believe the problem is coming from the <robotNamesapce>panda</robotNamespace> in your urdf.

tl;dr: You need to add ns="panda" in all controller_manager spawn nodes. eg. <node name="some_spawner" pkg="controller_manager" type="controller_manager" args="spawn whaterver_controller" ns="panda"/>.

Longer Anwser: In Gazebo9, the gazebo_ros_control plugin starts the controller_manager server in the namespace provided by the <robotNamespace> tag. In your case, panda. If you run rosservice list, you will see the following services


The node responsible for spawning controllers such as the joint state controller is a client to these services and needs to know the topic names. When using a node statement in the launch file like:

 <node name="some_spawner" pkg="controller_manager" type="controller_manager" args="spawn whaterver_controller"/>

the controller_manager client will look for those service in the root namespace (assuming no parent namespace). And since it can't find them, it will fail to spawn the controllers.

The easiest thing to do is to set ns="your_namespace" on the controller_manager node tags. You can also use <group> tags to create a parent namespace for your nodes.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-12-24 10:40:18 -0600

Seen: 79 times

Last updated: Dec 26 '18