ROS下安装xtion pro live

来源:互联网 发布:剑网三男捏脸数据 编辑:程序博客网 时间:2024/05/26 02:51

ROS下安装xtion pro live

安装环境:ubuntu12.04 + fuerte

1、执行$sudo apt-get install ros-fuerte-openni-kinect

2、执行$roscore。在ros环境下。

3、执行$roslaunch openni_launch openni.launch,执行openni的节点,判断有没有安装成功。

结果出现了如下错误:

显示no device connected,也就是驱动没装好。经查证,xtion prolive是有2个版本的,一个是旧版本,可以支持很多ROS,另一种版本是新版本,安装了之前的命令后就会出现驱动没装好。执行$ lsusb–v 就可以知道摄像头的版本信息。

4、执行$sudo apt-get install --reinstall libopenni-sensor-primesense0。安装新版本的xtion pro live。

5、再次执行$ roslaunch openni_launch openni.launch

出现的错误:

[ INFO] [1409020429.637758787]: Numberdevices connected: 1

[ INFO] [1409020429.738656579]: 1.device on bus 002:05 is a SensorV2 (601) from PrimeSense (1d27) with serial id'1307090112'

[ INFO] [1409020429.739982913]:Searching for device with index = 1

[ INFO] [1409020429.840873018]: Nomatching device found.... waiting for devices. Reason: openni_wrapper::OpenNIDevice::OpenNIDevice(xn::Context&,const xn::NodeInfo&, const xn::NodeInfo&, const xn::NodeInfo&,const xn::NodeInfo&) @/tmp/buildd/ros-groovy-openni-camera-1.8.9-0precise-20140720-0303/src/openni_device.cpp@ 61 : creating depth generator failed. Reason: USB interface is not supported!

仔细看以上的错误,发现USB接口有问题。

6、执行$sudo gedit /etc/openni/GlobalDefaults.ini

找到内容为“;UsbInterface=2”这一行,将这行更改为UsbInterface=0,注意去掉分号注释。

7、再次执行$roslaunch openni_launch openni.launch

8、执行$rosrun image_view image_view image:=/camera/rgb/image_color,就会看到摄像头采集的图片。

1 0
原创粉丝点击