Ros Kinect Configure Note

This blog for my kinect-v2 ros configure.

Environment

  • Thinkpad P70
  • Ubuntu 14.04
  • indigo

Reference to https://github.com/code-iai/iai_kinect2

Install

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.

NOTE:

  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.

Error

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);
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计