Robotics StackExchange | Archived questions

Unable to load controller spawner node

For some reason controller_manager isn't able to run a spawner node. If I use a launch file I get:

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

and if attempt to directly run it with rosrun:

[rosrun] Couldn't find executable named spawner below /opt/ros/melodic/share/controller_manager

I have ros-melodic-controller-manager package installed, and verified there is a compiled binary in /opt/ros/melodic/lib/controller_manager - not sure why ROS is trying to load it from /opt/ros/melodic/share/controller_manager??

EDIT: I've found that this only happens after I source the devel/setup.bash from my workspace. Somehow rosrun and roslaunch behave differently.

Asked by joaocandre on 2019-12-06 07:59:52 UTC

Comments

I've found that this only happens after I source the devel/setup.bash from my workspace

it's likely that something was not entirely correct when you built your workspace.

Try this:

  1. remove any source lines from your .bashrc (make sure to save it after editing)
  2. open a new terminal
  3. go to your workspace and rm -r devel/ build/
  4. source /opt/ros/melodic/setup.bash
  5. now build the workspace again
  6. then source devel/setup.bash

Now try again.

Asked by gvdhoorn on 2019-12-06 08:54:02 UTC

Answers