Rosanswers logo

Should I be able to have controller_manager spawner running inside the /mybot namespace and have it find /mybot/robot_description? Right now with Ubuntu 14.04 and Indigo I am only getting

  Could not find parameter robot_description on parameter server
  Failed to parse urdf file
  Initializing ... failed

If I load the robot_description to /robot_description even while keeping the spawner in the /mybot namespace it will work again, suggesting that something downstream from the spawner is only looking at a hardcoded /robot_description rather than respecting namespaces.


I've done a little digging and it seems perhaps the problem lies in a service call to load_controller loses namespace information, the service provider (which is in /gazebo) just looks up "robot_description". It seems like if I where to launch gazebo within the /mybot namespace it would find the description (and break other things maybe), but then if that were the only way to do that then that means multiple robots with different robot_descriptions wouldn't be possible?

In my urdf I have a gazebo_ros_control plugin loading with the set to /mybot/robot_description - should that make the loading of the controller work (though it isn't for me currently)? I do see messages like Starting gazebo_ros_control plugin in namespace: /mybot and gazebo_ros_control pulgin is waiting for model URDF in parameter [/mybot/robot_description] on the ROS param server.


I've replicated making everything run inside this with my forked copy of gazebo_ros_demos https://github.com/lucasw/gazebo_ros_demos, I can successfully launch gazebo with

roslaunch rrbot_gazebo rrbot_world.launch

And that works in the current state, though I had to put /mybot in more places than I'd like (rather than being able to put it an one level in the launch file and no lower level configuration files having to know about it and just operating on relative namespaces. (gazebo gets launched via empty_world.launch and that doesn't work within a namespace (more descriptive comments in the launch file)

But I can't get the controller nodes to launch properly from here:

roslaunch rrbot_control rrbot_control.launch

If I don't put the spawner inside mybot (and everything else is) I get:

[INFO] /opt/ros/indigo/lib/controller_manager/spawner:121 : Controller Spawner: Waiting for service controller_manager/load_controller [WARN] /opt/ros/indigo/lib/controller_manager/spawner:138 : Controller Spawner couldn't find the expected controller_manager ROS interface.

or if I do try to load the spawner within mybot:

[INFO] /opt/ros/indigo/lib/controller_manager/spawner:121 : Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:126 : Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:134 : Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:189 : Loading controller: joint_state_controller
[ERROR] /opt/ros/indigo/lib/controller_manager/spawner:195 : Failed to load joint_state_controller
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:189 : Loading controller: joint1_position_controller
[ERROR] /opt/ros/indigo/lib/controller_manager/spawner:195 : Failed to load joint1_position_controller
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:189 : Loading controller: joint2_position_controller
[ERROR] /opt/ros/indigo/lib/controller_manager/spawner:195 : Failed to load joint2_position_controller
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:197 : Controller Spawner: Loaded controllers: 
[INFO] /opt/ros/indigo/lib/controller_manager/spawner:206 : Started controllers:

Originally posted by lucasw on ROS Answers with karma: 8729 on 2014-12-04

Post score: 5

Original comments

Comment by crzx5 on 2015-03-09:
Lucas, did you ever find a solution to this? Thanks.

Comment by congleetea on 2015-05-02:
I alse meet this problem, can you give me some help about it . thanks very much.

Comment by Adolfo Rodriguez T on 2015-05-25:
To understand the situation: In which namespace is the gazebo_ros_control plugin being spawned? /mybot?. If you load the robot description under /mybot/robot_description the plugin fails to load, but if you do it under /robot_description it works?.

Comment by lucasw on 2015-06-15:
I didn't ever solve this directly, I just restructured to avoid it. I'm going to have to recreate this int the form of a simple example to demonstrate it.

Comment by lucasw on 2015-06-15:
I've updated the question to link to github where I've recreated the problem.

Comment by bahom on 2016-01-09:
Hy, have you solved this point because I'm having exactly the same problem on Jade. I did this tutorial http://gazebosim.org/tutorials?tut=ros_control&cat=connect_ros but the warning is hold "Controller spawner couldn't find the expected controller_manager ROS interface". Thanks a lot

Comment by filipposanfilippo on 2016-04-20:
Having the same problem on Jade. Any ideas?


2 Answers 2


Rosanswers logo

The spawner should be taking its namespace into account when looking for its associated controller_manager. So if the spawner node and the controller_manager are in the same namespace (e.g., / or /my_robot), things should work.

If you observe a different behavior, please open an issue, preferably accompanied with a patch.

Originally posted by Adolfo Rodriguez T with karma: 3907 on 2015-06-16

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by lucasw on 2015-06-17:
When I put them in the same namespace, then I'm back at /gazebo urdf model.cpp 'Could not find parameter robot_description on parameter server'. If I put another copy of robot_description at the root it is found and it works, but that defeats my purpose of putting it into another namespace.

Comment by lucasw on 2015-06-17:
I think the spawner is working fine, the problem is on the other end https://github.com/ros-simulation/gazebo_ros_pkgs/blob/jade-devel/gazebo_ros_control/src/gazebo_ros_control_plugin.cpp#L93 - if I set robotParam to the exact absolute location /mybot/robot_description it still doesn't find it.

Comment by lucasw on 2015-06-17:
But it is strange because gazebo_ros_control had on startup found the right robot_description and was happy, it was just when the service call arrived to start a controller where it looked for it again (why? Didn't it already have it?) in the wrong place and failed.

Comment by lucasw on 2015-06-17:

Comment by webvenky on 2015-09-14:
@lucasw Were you able to find a solution to this?

Comment by lucasw on 2016-08-15:
I haven't tried it but I think this shows it having been fixed https://github.com/ros-simulation/gazebo_ros_pkgs/issues/112 - I'm in kinetic and it still wasn't working though using the ubuntu packages (or was my config bag?), I'll try the source later.

Comment by Mav16 on 2017-02-20:
@lucasw Did you compile from source yet? I used sudo apt-get install ros-indigo-ros-control ros-indigo-ros-controllers today and it still says it couldn't find the parameter.


Rosanswers logo

Had the same problem for a long time and nothing posted here helped. The solution which worked for me: setting timeout while launching the node <node name="base_controller_spawner" pkg="controller_manager" type="spawner" args="joint_publisher velocity_controller --timeout 50 "/>

Originally posted by must_off with karma: 21 on 2016-08-21

This answer was NOT ACCEPTED on the original site

Post score: 2

Original comments

Comment by kleinma on 2017-06-05:
This solved the problem for me when loading multiple spawners under different namespaces in the same launch file. Thanks!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.