尝试使用TIAGo机器人进行SLAM时,运行 roslaunch tiago_2dnav_gazebo tiago_mapping.launch public_sim:=true 指令时加载TIAGo机器人失败,报错:terminate called after throwing an instance of 'pluginlib::LibraryLoadException' what(): According to the loaded plugin descriptions the class range_sensor_layer::RangeSensorLayer with base class type costmap_2d::Layer does not exist. Declared types are costmap_2d::InflationLayer costmap_2d::ObstacleLayer costmap_2d::StaticLayer costmap_2d::VoxelLayer
[move_base-24] process has died [pid 25956, exit code -6, cmd /opt/ros/kinetic/lib/move_base/move_base odom:=mobile_base_controller/odom cmd_vel:=nav_vel __name:=move_base __log:=/home/lhj/.ros/log/edbf89e2-6330-11ec-8a0c-907841bf18b9/move_base-24.log].
log file: /home/lhj/.ros/log/edbf89e2-6330-11ec-8a0c-907841bf18b9/move_base-24*.log
原因:一开始看到红色的报错,以为是move-base相关的ROS包没安装,所以首先运行以下指令,安装move-base相关的所有ROS包,如下。
sudo apt install ros-kinetic-move-base*
安装后仍然报错,后来才注意到那一段白的提示:terminate called after throwing an instance of 'pluginlib::LibraryLoadException' what(): According to the loaded plugin descriptions the class range_sensor_layer::RangeSensorLayer with base class type costmap_2d::Layer does not exist. Declared types are costmap_2d::InflationLayer costmap_2d::ObstacleLayer costmap_2d::StaticLayer costmap_2d::VoxelLayer。
解决:既然提示我们range_sensor_layer::RangeSensorLayer和costmap::Layer不存在,经过搜索后,发现range_sensor_layer和costmap_2d是两个ROS包,运行以下指令安装两个包后即可正常加载TIAGo机器人,并进行机器人导航,如下图。
sudo apt install ros-kinetic-range-sensor-layer
sudo apt install ros-kinetic-costmap-2d
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)