1.第一步要有个Ubuntu 系统, 我的系统是 14.04.5的 还要有一个kinect 加上kinect 的适配器。还有就是要把驱动的包下载下来。这四个条件的都具备了 ,我们开始安装驱动。
--------------------------------------分割线 --------------------------------------
OpenNI 与 SensorKinect 可以从以下信息下载:
如果取消关注Linux公社公众号,即使再次关注,也将无法提供本服务!
链接:https://pan.baidu.com/s/1pLFbkYR 密码:获得见上面的方法,地址失效请在下面留言。
--------------------------------------分割线 --------------------------------------
2.接下来安装步骤,进行安装,尽量不要拷贝,多用tab 提示
//libfreenect for kinect<br>
sudo apt-get install libfreenect-dev
sudo apt-get install ros-indigo-freenect-launch
//openni
//Installing dependencies:<br>
sudo apt-get install g++ python libusb-1.0-0-dev freeglut3-dev
sudo apt-get install doxygen graphviz mono-complete
sudo apt-get install openjdk-7-jdk
//Intalling OpenNI:
git clone https://github.com/OpenNI/OpenNI.git
cd OpenNI
git checkout Unstable-1.5.4.0
cd Platform/Linux/CreateRedist
sudo chmod +x RedistMaker
./RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-[xxx]
sudo ./install.sh
//Installing Kinect driver
git clone git://github.com/ph4m/SensorKinect.git
cd SensorKinect/Platform/Linux/CreateRedist
sudo chmod +x RedistMaker
./RedistMaker
cd ../Redist/Sensor-Bin-Linux-x64-v*
sudo ./install.sh
按照上边的步骤安装,如果没有错误。就说明驱动安装没有什么问题。
3.下载测试的程序,进行测试kinect 的是否安装成功。
cd ~/catkin_ws/src
git clone https://github.com/ros-drivers/openni_launch
git clone https://github.com/ros-drivers/openni_camera
cd ..
catkin_make
source devel/setup.bash
4.运行launch 文件启动kinect
roslaunch openni_launch openni.launch
5.显示kinect 中的话题
rosrun image_view image_view image:=/camera/rgb/image_color