按照参考:https://www.ncnynl.com/archives/201705/1556.html
执行:
roslaunch turbot_slam gmapping_demo.launch
出现如下问题:
[ INFO] [1556356699.587804099]: No matching device found.... waiting for devices. Reason: std::__cxx11::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-kinetic-openni2-camera-0.4.2/src/openni2_driver.cpp @ 737 : Invalid device number 1, there are 0 devices connected.
[ INFO] [1556356699.843488628]: Using plugin "static_layer"
[ INFO] [1556356699.871358640]: Requesting the map...
[ INFO] [1556356702.588162878]: No matching device found.... waiting for devices. Reason: std::__cxx11::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-kinetic-openni2-camera-0.4.2/src/openni2_driver.cpp @ 737 : Invalid device number 1, there are 0 devices connected.
[ INFO] [1556356705.588525191]: No matching device found.... waiting for devices. Reason: std::__cxx11::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-kinetic-openni2-camera-0.4.2/src/openni2_driver.cpp @ 737 : Invalid device number 1, there are 0 devices connected.
解决方案:https://www.ncnynl.com/archives/201609/810.html
在终端运行此命令:
TURTLEBOT_3D_SENSOR=kinect
继续按照slam教程执行: