Ask Your Question
0

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

asked 2019-01-25 14:12:15 -0500

turtlebot3 gravatar image

updated 2019-01-25 17:51:32 -0500

This is my first time using ROS. I'm using ubuntu 18.04 and ROS-melodic on my remote (PC) and ROS-kinetic on my turtlebot (pc). I'm trying to run on my Remote (PC)

(roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping)

But I get this error!!!!

process[robot_state_publisher-1]: started with pid [54409]
ERROR: cannot launch node of type [gmapping/slam_gmapping]: can't locate node [slam_gmapping] in package [gmapping]
process[rviz-3]: started with pid [54410]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[robot_state_publisher-1] process has finished cleanly
log file: /home/kaos5-q/.ros/log/2a9e2d58-20d8-11e9-ba50-7085c28192a9/robot_state_publisher-1*.log
libpng warning: iCCP: known incorrect sRGB profile

image description

How can fix this??

Further Work

  • We tried adding the path of gmapping to the ROS environment to check if it works

    export ROS_PACKAGE_PATH=/home/kaos5-q/catkin_ws/src:/home/kaos5-q/catkin_ws/src/turtlebot3_msgs:/opt/ros/melodic/share:/home/kaos5-q/catkin_ws/src/slam_gmapping/gmapping

  • This is what looks like now!
  • After I ran, source ~/.bashrc Is this what you mean by sourcing??
edit retag flag offensive close merge delete

Comments

Do you have the gmapping package installed?

jayess gravatar imagejayess ( 2019-01-25 15:12:37 -0500 )edit

Yes I have gmapping installed! I believe this is a problem with Ros/environment variables. Setting a ros path for gmapping. That's my assumption. I'm new to ROS, excuse my ignorance.

turtlebot3 gravatar imageturtlebot3 ( 2019-01-25 15:37:22 -0500 )edit

How did you install it? From source or using apt?

jayess gravatar imagejayess ( 2019-01-25 15:38:16 -0500 )edit

I installed it from source.

turtlebot3 gravatar imageturtlebot3 ( 2019-01-25 15:43:51 -0500 )edit

Why did you install from source? You should install the binary using apt instead.

jayess gravatar imagejayess ( 2019-01-25 15:45:37 -0500 )edit

I tried at first with the binary using apt but it didn't work. I searched on google why it didn't work and it's because the package has not been released from the melodic release page. I used this website https://answers.ros.org/question/2961...

turtlebot3 gravatar imageturtlebot3 ( 2019-01-25 15:55:43 -0500 )edit

OK, that makes sense then. Are you sourcing the workspace in where the package resides and was compiled?

jayess gravatar imagejayess ( 2019-01-25 16:12:13 -0500 )edit

I've edited my question a little. I tried to source how you said and it still doesn't work. I'm doing something wrong in here.

turtlebot3 gravatar imageturtlebot3 ( 2019-01-25 17:52:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-25 18:29:16 -0500

jayess gravatar image

updated 2019-01-25 18:31:43 -0500

You should take a look at the catkin tutorials. You need to source your workspace.

I'm assuming that you compiled your workspace using

catkin_make

from the root of your workspace (e.g., ~/catkin_ws).

Anytime that you open a new terminal, you need to source two files: the setup.bash for your ROS distribution and the setup.bash for your workspace. It looks like you've already sourced your distribution's setup.bash, now you just need to do the same for your workspace. Again, assuming that the root of your workspace is at ~/catkin_ws and you are in that directory, then you run

source devel/setup.bash

and then ROS should be able to find your compiled gmapping package and the node(s) that you're using. Now your ROS_PACKAGE_PATH environment variable should be set. I've never had to set this on my own.

edit flag offensive delete link more

Comments

Perfect!! It worked

turtlebot3 gravatar imageturtlebot3 ( 2019-01-28 06:38:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-01-25 14:12:15 -0500

Seen: 509 times

Last updated: Jan 25