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

Problem with gmapping.launch file

asked 2016-01-27 12:27:43 -0600

updated 2016-05-22 19:13:49 -0600

130s gravatar image

Hello!

I am a newbie to ROS. Please bear with me.

I was following the tutorials by Clearpath Robotics for Navigation basics. Here is the link: ROS Navigation Basics

Here, at the step where I have to launch the gmapping.launch file, I get the following error :

ERROR: cannot launch node of type [gmapping/slam_gmapping]: gmapping
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/sri/jackal_navigation/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks

I am not sure what this error means. Can anybody please help?

P.S. There is another question where the similar error was obtained here. However, the answers there did not help me in resolving the issue.

edit retag flag offensive close merge delete

Comments

are you sure gmapping is installed? Just run a sudo apt-get install ros-indigo-slam-gmapping to install it.

It is also a bit odd, that you have /opt/ros/indigo/share/ros in your path. In which order did you source the workspaces and did you edit the ROS_PACKAGE_PATH manually?

mgruhler gravatar image mgruhler  ( 2016-01-28 01:47:16 -0600 )edit

Thank you! I had installed gmapping by pulling it from github, but after installing thru aprt-get it's working fine. I sourced the workspaces as per the tutorial. I did not edit the ROS_PACKAGE_PATH. I am not sure of /opt/ros/indigo/share/ros in my path. Is it gonna pose a problem in the future?

Srinidhi gravatar image Srinidhi  ( 2016-01-28 04:45:11 -0600 )edit

I'll just post as an answer, as it is solved now...

mgruhler gravatar image mgruhler  ( 2016-01-28 07:37:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-01-28 07:42:33 -0600

mgruhler gravatar image

Seems as if gmapping is not installed and/or not on your ROS_PACKAGE_PATH.

Install via sudo apt-get install ros-indigo-slam-gmapping. If you want to build it from source, you need to put it in your ROS workspace (I'm guessing in /home/sri/jackal_navigation/src and build the workspace.

About your strange paths in the ROS_PACKAGE_PATH:

Maybe try to build again with the following commands in a new terminal (make sure you don't source anything in the bashrc).

source /opt/ros/indigo/setup.bash
echo $ROS_PACKAGE_PATH
cd /home/sri/jackal_navigation
catkin_make
source /home/sri/jackal_navigation/devel/setup.bash
echo $ROS_PACKAGE_PATH

And check the output. The output should be (approximately ;-) ):

  1. /opt/ros/indigo/share:/opt/ros/indigo/stacks
  2. /home/sri/jackal_navigation/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-01-27 12:27:43 -0600

Seen: 4,901 times

Last updated: Jan 28 '16