Ros Kinect Configure Note


This blog for my kinect-v2 ros configure.


  • Thinkpad P70
  • Ubuntu 14.04
  • indigo

Reference to


Before start, make sure the cuda, cudnn has been configured correctly.

First, you need to install libfreenect2.

I recommend to use export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 in your .zshrc or .bashrc (more professional, in bash_profile or .zshenv). You will avoid some problems about library error.

When installing libfreenect2, Use cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2 -DENABLE_CXX11=ON to generate Makeifle at build/

Then Install iai-Kinect

I use catkin_make -DCMAKE_BUILD_TYPE="Release" -Dfreenect2_DIR=$HOME/freenect2/lib/cmake/freenect2 to Compile iai-Kinect because installing to $HOME/freenect2 before.


  1. enable C++11 by using cmake .. -DENABLE_CXX11=ON instead of cmake ..
  2. If something is not working, check out the latest stable release, for example git checkout v0.2.0.
  3. check your opencv version: pkg-config --modversion opencv.
  4. NEVER EVER use sudo prime-select intel.


I missed sudo apt-get install beignet-dev; so I got this error:

Building CXX object iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge.dir/src/kinect2_bridge.cpp.o
Building CXX object iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge_nodelet.dir/src/kinect2_bridge.cpp.o
[100%] Built target kinect2_viewer
/home/svtter/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp: In member function ‘bool Kinect2Bridge::initPipeline(const string&, int32_t)’:
/home/svtter/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:427:28: error: expected type-specifier
       packetPipeline = new libfreenect2::OpenCLKdePacketPipeline(device);

除非另有声明,本网站采用知识共享“ 署名-非商业性使用-相同方式共享 3.0 中国大陆 ”许可协议授权。

tag:  #ROS #kinect #ros