1. First git to download the code, put it under the home folder
git clone https://github.com/OpenKinect/libfreenect2.git
2. Then install the dependencies as follows, preferably pre-compiled and installed OpenCV
sudo apt-get install build-essential cmake pkg-config libturbojpeg libjpeg-turbo8-dev mesa-common-dev Freeglut3-dev Libxrandr-dev Libxi-dev
3. Then install the LIBUSB. You need to add a PPA here
sudo apt-add-repository ppa:floe/libusbsudo apt-get updatesudo apt-get Install Libusb-1.0-0-dev
4. Then run the following command to install the GLFW3
sudo apt-get install Libglfw3-dev
If not successful, use the following command instead of the
CD libfreenect2/dependssh Install_ubuntu.shsudo dpkg-i libglfw3*_3.0.4-1_*.deb
5. Then install the OpenCL Support library (no GPU is used, this step is skipped directly)
6. Then compile the library
Cd.. mkdir build && CD Buildcmake. Makesudo make Install
7. Testing
There is a bin folder under Build, place the generated output file, plug in the Kinect, and run. At this point the yellow light turns white, indicating a drive. Note: Only for USB3 interfaces, the desktop and notebook have a 3.0 port.
./bin/protonect
If you are not prompted enough, failed to open Kinect V2 access denied
At this time need to put the Libfreenect2 folder under the rules of a 90 file in the beginning of the copy to/etc/udev/rules.d/below it.
Then rerun the command above.
8. Ros Interface Installation
For Ubuntu14.04 that already have Ros Indigo installed, use the following command
CD ~/catkin_ws/src/git clone Https://github.com/code-iai/iai_kinect2.gitcd iai_kinect2rosdep install-r--from-paths. CD ~/catkin_wscatkin_make-dcmake_build_type= "Release" Rospack profile
9. Testing the Ros interface
Roslaunch Kinect2_bridge Kinect2_bridge.launch
And then open a new terminal again.
Rosrun Kinect2_viewer Kinect2_viewer
The image is displayed as follows:
ubuntu14.04 Kinect V2+ros Interface Installation