ROS navigation gmapping 报错 [slam_gmapping-1] process has died exit code opt/ros/kinetic/lib/gmapping

   

改装版turtlebot2。

调用turtlebot_navigation导航包,但是在建图运行gmapping.launch文件后报错

先是slam_gmapping节点死掉,然后报timed out for tf transform。我很确定加了tf变换,所以主要错误肯定是第一句,gmapping节点不能启动导致的后续错误。   

 

    先排查错误。由于改装了turtlebot,修改了部分launch文件,所以不确定是否我修改问题。

   我就想到,要不先运行一下仿真程序,让gazebo进行gmapping,如果仿真可,就是我修改问题了。

roslaunch turtlebot_gazebo turtlebot_world.launch
roslaunch turtlebot_gazebo gmapping_demo.launch

ROS navigation gmapping 报错 [slam_gmapping-1] process has died exit code opt/ros/kinetic/lib/gmapping_第1张图片

 

 

    运行了仿真后,依然报错,那肯定不是我修改的部分,应该时编译库哪里出了问题。错误信息可以看到,他调用编译好的库slam,这里引用节点死掉。

我就想是不是要重新下载slam_gmapping,如下

 

nvidia@tegra-ubuntu:~$ sudo apt-get install ros-kinetic-gmapping
[sudo] password for nvidia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-kinetic-gmapping is already the newest version (1.3.10-0xenial-20180826-080151-0800).
The following packages were automatically installed and are no longer required:
  libdbusmenu-gtk4 ros-kinetic-laser-proc ros-kinetic-urg-c
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 509 not upgraded.

    提示我已经安装,并且slam_gmapping已经是最新版本了。

 

   但保险起见,我决定在工作站重新下载slam_gmapping的包,先不修改原先安装在kinetic/lib下的gmapping包

cd ~/catkin_ws/src
git clone https://github.com/ros-perception/slam_gmapping.git
cd ~/catkin_ws
catkin_make

这里catkin_make时可以看到新加入slam_gmapping结点之类的。

 

安好之后,在工作站下再次运行仿真gmapping,记得工作空间要修改为工作站目录,

source ~/catkin_ws/devel/setup.bash

 

然后如下图,成功运行了。

 

ROS navigation gmapping 报错 [slam_gmapping-1] process has died exit code opt/ros/kinetic/lib/gmapping_第2张图片

 

所以就是之前编译好的slam-gmapping的问题,重新下载即可。

 

你可能感兴趣的:(ROS navigation gmapping 报错 [slam_gmapping-1] process has died exit code opt/ros/kinetic/lib/gmapping)