Error launching Gmapping node on ROS
Hi,
I am using ROS kinetic on ubuntu 16 and have installed the binaries for openslam and slam_gmapping using the command
sudo apt-get install ros-kinetic-slam-gmapping and sudo apt-get install ros-kinetic-openslam-gmapping
.
However, whenever I am trying to use the gmapping node with ROS, it always throws the following error
ERROR: cannot launch node of type [gmapping/slam_gmapping]: can't locate node [slam_gmapping] in package [gmapping]
I am unable to figure out how do I solve this problem. My environment variables are properly defined in the bashrc.
Thanks
Edit 1:
dpkg -l | grep gmapping
dpkg -l | grep gmapping
ii ros-kinetic-gmapping 1.3.10-0xenial-20181117-012312-0800 amd64 This package contains a ROS wrapper for OpenSlam's Gmapping.
ii ros-kinetic-openslam-gmapping 0.1.2-0xenial-20180809-134859-0800 amd64 ROS-ified version of gmapping SLAM.
ii ros-kinetic-slam-gmapping 1.3.10-0xenial-20181117-032709-0800 amd64 slam_gmapping contains a wrapper around gmapping which provides SLAM capabilities.
Edit 2:
My environment is set as follows: all binary packages installed in
/opt/ros/kinetic/share
and my custom package are inside
~/catkin_ws/src
the last two lines in my bashrc contains the following lines:
source /opt/ros/kinetic/setup.bash
source /home/arav/catkin_ws/devel/setup.bash
The gmapping works when i do
source /opt/ros/kinetic/setup.bash
. and rosrun gmapping slam_gmapping
But my gmapping.launch
is inside the catkin_ws
, so when I source ~/catkin_ws/devel/setup.bash
or source ~/.bashrc
, the gmapping
does not work ad gives the ERROR.
Edit 3:
Following @gvdhoorn's advice I cleaned my catkin_ws
workspace by removing devel
and build
folders and catkin_make
again. This partially solved the problem of finding the slam_gmapping
node. However, I am getting a new error now. P.S. gmapping
still does not work.
process[gmapping-2]: started with pid [23549]
/opt/ros/kinetic/lib/gmapping/slam_gmapping: symbol lookup error: /opt/ros/kinetic/lib/gmapping/slam_gmapping: undefined symbol: _ZN8GMapping14sampleGaussianEdj
[gmapping-2] process has died [pid 23549, exit code 127, cmd /opt/ros/kinetic/lib/gmapping/slam_gmapping __name:=gmapping __log:=/home/arav/.ros/log/f518ac08-ff53-11e8-a0af-a0d3c148ec01/gmapping-2.log].
log file: /home/arav/.ros/log/f518ac08-ff53-11e8-a0af-a0d3c148ec01/gmapping-2*.log
What is the output of
dpkg -l | grep gmapping
?hi, grep | gmapping gives :
but when I run :
rospack gmapping
it returns/opt/ros/kinetic/share/gmapping
You must run the full command:
dpkg -l | grep gmapping
.Hi Thanks Yes I ran the full command and the result is same :
Hi I edited the question, also sorry for the previous comment I put a wrong command for grep gmapping please check edit1 for the grep result.
So then the question becomes: are the actual files installed.
What is the output of
ls -al /opt/ros/kinetic/lib/gmapping
?If the
slam_gmapping
binaries are there, try running arospack profile
and then try the launch file again.$ ls -al /opt/ros/kinetic/lib/gmapping
rosrun gmapping slam_gmapping gives the same error that slam_gmapping node not found.