Ros Vision and image-kinect V2 use

Source: Internet
Author: User
Tags git clone

Microsoft's Kinect V2 device is recommended for use in the Indigo version of ROS (more documentation), not for use in the Kinect version (possibly because the OPENCV version is a 3.X problem), the following installation is for Ubuntu 14.04 Indigo ROS. 1 Required Packages

1) libfreenect2 (https://github.com/OpenKinect/libfreenect2.git)

This bag is mainly driven by Kinect2-related things. Note This package does not support Kinect V1, and the hardware requires USB3.0 for USB 2.0.

2) Iai_kinect2 (https://github.com/code-iai/iai_kinect2.git)

This package includes: Camera calibration tool, depth data registration tool, bridging tool between Libfreenect2 and Ros so that we can process data streams with tools on ROS; tools to view data flow

Add a reference link: http://www.ros.org/news/2014/09/microsoft-kinect-v2-driver-released.html


2 Installing Packages

If you have any questions, you can refer to the Install section of Https://github.com/code-iai/iai_kinect2.git for more detailed explanations. It is also recommended to install the OPENCV package first.

1) Download Libfreenect2

git clone https://github.com/OpenKinect/libfreenect2.git
CD Libfreenect2

CD depends;./download_debs_trusty.sh
2) Install the necessary basic package

sudo apt-get install build-essential cmake pkg-config libturbojpeg Libjpeg-turbo8-dev

3) Install Libusb

sudo dpkg-i debs/libusb*deb

4) Installing OpenGL

sudo dpkg-i debs/libglfw3*deb; sudo apt-get install-f

5) Install OpenCL (optional, if no GPU is required, or do not need to be accelerated or need to be installed)

I do not need, omitted here.

6) Cuda installation (optional, for Nvidi)

I do not need

7) Install VAAPI (optional, Intel only)

8) Install OpenNI2 (optional)

9) Compiling Libfreenect2

mkdir build && CD build
cmake:-denable_cxx11=on make
sudo make install

10) Verification of LIBFREENECT2 installation

./protonect GL to test OpenGL support:
/protonect CL to test OpenCL support:
/protonect CPU to test for CPU support.
If you are prompted for failed to open Kinect V2 Access denied, copy the file that starts with a 90 in the rules below the Libfreenect2 folder to/etc/udev/rules.d/.


11) Install Iai_kinect2

CD ~/catkin_ws/src/
git clone https://github.com/code-iai/iai_kinect2.git
CD iai_kinect2
ROSDEP Install -R--from-paths.
CD ~/catkin_ws
catkin_make-dcmake_build_type= "Release"
Note: If you install Libfreenect2 in a nonstandard directory/usr/local, you must make the path-dfreenect2_dir=path_to_freenect2/lib/cmake/freenect2, or the compilation will fail

3 Test Image Display

Roslaunch Kinect2_bridge kinect2_bridge.launch
rosrun kinect2_viewer kinect2_viewer


4 calibrating the camera (Https://github.com/code-iai/iai_kinect2/tree/master/kinect2_calibration#calibrating-the-kinect-one)

Copy the calibration file to kinect2_bridge/data/<serialnumber> after the calibration is complete.
5 re-test (display RGB or dot cloud)

Rosrun kinect2_viewer kinect2_viewer SD image or Rosrun kinect2_viewer kinect2_viewer SD Cloud


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.