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

Navigation nodes aren't found if devel setup.bash sourced in addition to the opt devel

asked 2016-11-02 11:11:38 -0500

alexsb92 gravatar image


I have a problem with my navigation nodes in (this is for use with a husky if it matters, but I don't think it does).

It came to light when i tried to use mapserver as part of a launch file. ROS complains that "ERROR: cannot launch node of type [map_server/map_server]: can't locate node [map_server] in package [map_server]". This happens for all other nodes in the navigation package.

In my setup i have the following two lines in my .bashrc file so a new terminal would have all the variables it needs.

source /opt/ros/indigo/setup.bash
source /home/alex/catkin_ws/devel/setup.bash

My solution to this is to open a new terminal and manually source /opt/ros/indigo/setup.bash in it, and then rosrun whatever node i'm interested in. That's quite clunky however and it would be neat to have all the relevant nodes in the project launch file.

Has anyone seen this before?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-02 11:17:10 -0500

ahendrix gravatar image

Do you have the navigation package in your catkin workspace, or was it in your workspace at some point? It's possible that your workspace has cached an un-built version of navigation that is hiding the system version.

You can see where roslaunch is looking for packages by running rospack find:

rospack find map_server

Should tell you whether roslaunch is looking in the system install (/opt) or in your workspace.

edit flag offensive delete link more


It's looking for it in the system install (/opt/ros/indigo/share/map_server). I might have had it in my catkin space before? I was trying to use the non default version of Gazebo, but that's no longer the case. I believe at the time, I simply deleted the navigation folder.

alexsb92 gravatar image alexsb92  ( 2016-11-02 11:34:50 -0500 )edit

Although, I do see map_server folders in the share subfolder of devel and install. Are those from my old attempt? Is there a command to purge the catkin folders (like a make clean)? If not, i guess I could delete the whole folder and redo it, right?

alexsb92 gravatar image alexsb92  ( 2016-11-02 11:38:10 -0500 )edit

There isn't an explicit clean command; most users just delete the build and devel folders in their workspace and then build again.

ahendrix gravatar image ahendrix  ( 2016-11-02 13:22:46 -0500 )edit

Yeah, that did it. Thanks!

alexsb92 gravatar image alexsb92  ( 2016-11-06 14:22:18 -0500 )edit

Question Tools

1 follower


Asked: 2016-11-02 11:11:38 -0500

Seen: 177 times

Last updated: Nov 02 '16