Unable to load controller spawner node

asked 2019-12-06 06:59:52 -0600

joaocandre gravatar image

updated 2019-12-06 07:21:14 -0600

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.

edit retag flag offensive close merge delete

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.

gvdhoorn gravatar imagegvdhoorn ( 2019-12-06 07:54:02 -0600 )edit