ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

"can't locate node [spawner] in package [controller_manager]"

asked 2016-11-07 14:51:50 -0500

GlenH gravatar image

Trying to run the rrbot gazebo demo found at http://arnaudbertrand.io/blog/2015/06... . When I run:

> roslaunch -v rrbot_control rrbot_control.launch

I get:

ERROR: cannot launch node of type [controller_manager/spawner]: can't locate node [spawner] in package [controller_manager]

The problem seems to be that rosrun is trying to find the controller_manager spawner node in /opt/ros/kinetic/share/controller_manager, but in fact it seems to be installed at /opt/ros/kinetic/lib/controller_manager.

This is my first week using ROS, so I'm at something of a loss how to fix this. Is spawner simply installed in the srong location? Should I copy the files over to /share?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-11-07 15:53:08 -0500

GlenH gravatar image

OK, so if anyone who is flailing trying to understand ROS in the future stumbles across this, here's the answer:

ROS installs a script called "setup.bash" in /opt/ros/kinetic that you have to source before anything will run. If you also install some third-party code that you have to build from source (as opposed to installing from packages), that code resides in a directory somewhere on your system called "catkin_ws" or similar. There will be a couple of directories inside of this called "devel" and maybe "install". Inside those directories there are also "setup.bash" files that tell the system about the new stuff you've built. You can source them using an "--extend" flag in order to add the extra search paths to your ROS system.

Here's the key, though: you have to source all of the setup scripts in all of the terminals, even ones that you aren't using to call your new code.

That was my problem: I was sourcing /opt/ros/kinetic/setup.bash in all of my terminals, but only sourcing devel/setup.bash in the terminal I was using to call the code that lived in my catkin workspace.

edit flag offensive delete link more

Comments

re: "source all the setup scripts": typically, you only source a single setup script, which already automatically extends any underlying workspaces for you. You achieve that by building your own workspace after having sourced one that contains your dependencies. ..

gvdhoorn gravatar image gvdhoorn  ( 2016-11-08 12:25:50 -0500 )edit

.. All of your workspaces (if you have multiple) should form a chain, with /opt/ros/$distro probably being the 'lowest' one, and all the others layering on top of that. See also wiki/catkin/workspace overlaying.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-08 12:27:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-11-07 14:51:50 -0500

Seen: 2,396 times

Last updated: Nov 07 '16