ubuntu16.04+ROS安装kinectV1

时间:2021-03-30 05:46:04

1.安装驱动

安装ROS软件包
以下2种方式,任选一种即可,当然全部安装也没有问题

1)使用openni_launch

sudo apt-get install ros-kinetic-openni-camera ros-kinetic-openni-launch

注意:openni2_launch已经不再支持Kinect任何产品。

2)使用freenect_launch

sudo apt-get install libfreenect-dev

sudo apt-get install ros-kinetic-freenect-camera ros-kinetic-freenect-stack ros-kinetic-freenect-launch

2.查看与测试

“roslaunch freenect_launch freenect-registered-xyzrgb.launch”或者“roslaunch freenect_launch freenect.launch”,验证kinect驱动是否安装成功;
rostopic list查看ORB-SLAM2需要的两个topic: /camera/rgb/image_raw /camera/depth_registered/image_raw
方法一:通过rosrun image_view image_view image:=[TOPIC]来查看相机图片
rosrun image_view image_view image:=/camera/depth/image_raw,显示深度图
方法二:rosrun rqt_image_view rqt_image_view
方法三:rosrun rviz rviz