安装功能包
kinetic@vm:~$ sudo apt-get install ros-kinetic-freenect-*
kinetic@vm:~$ git clone https://github.com/avin2/SensorKinect.git
kinetic@vm:~$ cd SensorKinect/Bin
32位安装:
kinetic@vm:~/SensorKinect/Bin$ tar xvf SensorKinect093-Bin-Linux-x86-v5.1.2.1.tar.bz2
kinetic@vm:~/SensorKinect/Bin$ cd Sensor-Bin-Linux-x86-v5.1.2.1/
kinetic@vm:~/SensorKinect/Bin/Sensor-Bin-Linux-x86-v5.1.2.1$ sudo ./install.sh
64位安装:
kinetic@vm:~/SensorKinect/Bin$ tar xvf SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2
kinetic@vm:~/SensorKinect/Bin/Sensor-Bin-Linux-x64-v5.1.2.1$ sudo ./install.sh
执行后
[sudo] password for kinetic:
Installing PrimeSense Sensor
****************************
creating config dir /usr/etc/primesense...OK
copying shared libraries...OK
copying executables...OK
registering module 'libXnDeviceSensorV2KM.so' with OpenNI...OK
registering module 'libXnDeviceFile.so' with OpenNI...OK
copying server config file...OK
setting uid of server...OK
creating server logs dir...OK
installing usb rules...OK
installing modprobe blacklist...OK
*** DONE ***
---------------------
连接成功
kinect的驱动文件在/opt/ros/kinetic/share/freenect_launch/launch/freenect.launch
可将freenect.launch文件复制出来
然后在终端执行
$roslaunch freenect.launch
在rviz工具中查看kinect获取图像
$rosrun rviz rviz
在rviz界面中添加点云和Image插件,设置点云的话题,和Fixed Frame