Ubuntu Connection Kinect v2

Source: Internet
Author: User
Tags git clone

After this process to realize, sometimes not the method is not correct, is not the wrong solution, just because of configuration problems, if the configuration is wrong, naturally there will be a variety of problems, rather than the first to determine the configuration. However, if not experienced this process, I do not know is because of my configuration problems caused by the problem, hey.
I use the Ubuntu14.04lts,ros version is Indigo,kinect v2, I am a dual-system installed Ubuntu, with virtual machine installed Ubuntu is not working, there will be a variety of problems, because the virtual machine with its own drive, which is obviously not possible.
The following formally entered the installation
1. Install LIBFREENECT2, this libfreenect2 is said to be its driver package, hope is stable, put in the home directory; git clone https://github.com/OpenKinect/ Libfreenect2.git 2. Installing the Libfreenect2 dependencies

sudo apt-get install build-essential cmake pkg-config libturbojpeg libjpeg-turbo8-dev mesa-common-dev Freeglut3-dev Libxrandr-dev Libxi-dev

3. Installing Libusbsudo apt-add-repository ppa:floe/libusbsudo apt-get update
When the PPA command is generally approved, update it.
sudo apt-get install Libusb-1.0-0-dev4. Installing GLFW3CD Libfreenect2/dependsSH install_ubuntu.sh sudo dpkg-i libglfw3*_3.0.4-1_*.deb

Depends below is a install_ubuntu.sh this file, sh it is estimated to be the path.

sudo dpkg-i libglfw3*_3.0.4-1_*.debThis command installs four packages at once, which can be seen under the depends command.
Do not use sudo apt-get install GLFW3, but you can use sudo apt-get remove Libglfw3-dev uninstall it.
All packages that are installed as packages can be removed by sudo apt-get remove
5. Then compile the libraryCd.. mkdir build && CD build CMake. Make sudo make install7. Test
Plug in the Kinect data cable.
Run LSUSB if the bus 002 Device 003:id 045e:02c4 Microsoft Corp appears below.
Bus 002 Device 002:id 045e:02d9 Microsoft Corp. That means it's connected.

./bin/protonect
If you are prompted no device connected, because your virtual machine default setting is the port of USB2.0, and Kinect v2 to pick up the port of usb3.0, so make changes, but the virtual machine installed Ubuntu is not connected to Kinect.

If you are reloading or recompiling libfreenect2, the CDsudo rm-rf/usr/local/include/libfreenect2
Cd/usr/local/lib
sudo rm-rf libfreenect2.so libfreenect2.so.0.2 libfreenect2.so.0.2.0
CD openni2/Driverssudo rm-rf libfreenect2-openni2.so libfreenect2-openni2.so.0
Ros Interface Installationfor 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
ROSDEP Install-r-from-paths. This step may be an error, but this error is normal, no tube, will not affect the final result.

You can test it next.

Test

Open a new terminal, run

CD ~/catkin_ws/
Catkin_make
source./devel/setup.bash
CD src

roslaunch kinect2_bridge kinect2_bridge.launch
获取Kinect数据

Open a new terminal, run

CD ~/catkin_ws/
Catkin_make
source./devel/setup.bash
CD SRC rosrun kinect2_viewer kinect2_viewer
查看kinect数据
Reference Document: http://www.cnblogs.com/gaoxiang12/p/

Ubuntu Connection Kinect v2

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.