2

I've been trying for the past two days to get my microsoft kinect one (v2.0) to work with Ubuntu 16.04 and ROS kinetic. I downloaded the libfreenect2 drivers (https://github.com/OpenKinect/libfreenect2) and followed the step by step instructions. I was successfully able to run ./Protonect which showed the IR, RGB and 2 depth sensor streams. I then tried to use the kinect2-ros package to bridge the drivers with ROS but kept running into the error "can't locate libfreenect2", which is called when running catkin_make in my workspace.

-- +++ processing catkin package: 'kinect2_bridge'
-- ==> add_subdirectory(kinect2-ros/kinect2_bridge)
-- Checking for module 'libfreenect2'
--   No package 'libfreenect2' found
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
  kinect2-ros/kinect2_bridge/CMakeLists.txt:7 (pkg_check_modules)

Could someone please help me understand what's going on and / or if someone has successfully got the kinect v2 working with these system settings, could you please share your knowledge?

Thanks

Physbox
  • 385
  • 4
  • 14

3 Answers3

0

have you tried the instructions for kinect2-ros ?

the problem is catkin cannot find libfreenect2 in your PATHs.

The easiest way is to remove libfreenect2 that You compiled along with it's outputs and install it from PPA as described In this Github repo.

Mohammad Ali
  • 569
  • 4
  • 10
0

I am able to run Kinect v2 with ROS Kinetic on Ubuntu 16.04 using the example found here:

http://wiki.ros.org/rtabmap_ros/Tutorials/HandHeldMapping

I am able to get SLAM mapping, odometry, point cloud, etc.

I have not had to custom build anything to get this to work. Everything I needed was available from apt repositories.

Update / Edit: Using ROS Installation for Ubuntu documentation, select your ROS distro (presumably "Kinetic" for 16.04 Ubuntu). Then follow the directions:

  1. Set up sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  1. Set up your keys
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
  1. Update package index
sudo apt-get update
  1. Install ROS
sudo apt-get install ros-kinetic-desktop-full
veggiebenz
  • 389
  • 5
  • 12
0

Regarding ROS Kinetic on Ubuntu 16.04, and KinectV2 with IAI Kinect2:

Make sure that:

  1. When you compile libfreenect2, you use cmake .. -DENABLE_CXX11=ON instad of just cmake .. .

  2. When you compiled libfreenect2, you had to specify a path of installation (if you didn't it will install on /usr/local ). The IAI Kinect2 repository instructs that:

Note: If you installed libfreenect2 somewhere else than in $HOME/freenect2 or a standard location like /usr/local you have to specify the path to it by adding -Dfreenect2_DIR= path_to_freenect2/lib/cmake/freenect2 to catkin_make.

Double check those. I was able to successfully compile the package.

Bersan
  • 1,032
  • 1
  • 17
  • 28