1 开发环境 Ubuntu14.04 Ros indigo
ASUS Xtion Pro live
openni1_launch 安装
sudo apt-get install ros-indigo-rgbd-launch ros-indigo-openni2-camera ros-indigo-openni2-launch
测试
roscore
roslaunch openni2_launch openni2.launch
error
No matching device found.... waiting for devices. Reason: openni2_wrapper::OpenNI2Device::OpenNI2Device(const string&) @ /tmp/binarydeb/ros-indigo-openni2-camera-0.4.2/src/openni2_device.cpp @ 75 : Device open failed
Could not open "1d27/0601@1/8": Failed to open the USB device!
解决:sudo gedit /etc/openni/GlobalDefaults.ini
找到内容为“; UsbInterface=2”这一行,将该行更改为UsbInterface=0, 注意去掉分号注释。
rqt_image_view
选择话题可以查看图像
标定
sudo apt install ros-kinetic-camera-calibration
roslaunch openni2_launch openni2.launch
rosrun camera_calibration cameracalibrator.py --size 11x8-square 0.015 image:&