安裝環(huán)境:
ubuntu16.04
Ros kinetic
安裝libfreenect2
1.下載libfreenect2盗蟆,并轉(zhuǎn)到libfreenect下
$ git clone https://github.com/OpenKinect/libfreenect2.git
$ cd libfreenect2
2.安裝
sudo apt-get install build-essential cmake pkg-config libusb-1.0-0-dev libturbojpeg libjpeg-turbo8-dev
sudo apt-get install libglfw3-devlibopenni2-dev
cd ..
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2
make
make install
sudo cp../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
測試
$ ./bin/Protonect
iai_kinect2安裝
1.下載iai_kinect2包
$ cd ~/catkin_ws/src/
$ git clone https://github.com/code-iai/iai_kinect2.git
2.安裝iai_kinect2依賴
$ cd iai_kinect2
$ rosdep install -r --from-paths .
3.編譯
$ cd ~/catkin_ws
$ catkin_make -DCMAKE_BUILD_TYPE="Release"
4.測試運行
$ roslaunch kinect2_bridge kinect2_bridge.launch
新開一個新的終端缆蝉,觀察接收到的圖像:
$ rosrun kinect2_viewer kinect2_viewer