- Enter the following codes in your terminal
sudo apt-get install ros-indigo-openni-camera
sudo apt-get install ros-indigo-openni-launch
Modify GlobalDefaults.ini
sudo gedit /etc/openni/GlobalDefaults.ini
then uncomment the line: ;UsbInterface=2
(just delete the ;
symbol)
mkdir ~/kinectdriver
cd ~/kinectdriver
git clone https://github.com/avin2/SensorKinect
cd SensorKinect/Bin/
tar xvjf SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2
cd Sensor-Bin-Linux-x64-v5.1.2.1/
sudo ./install.sh
- To view the rgb image:
roslaunch openni_launch openni.launch
rosrun image_view image_view image:=/camera/rgb/image_raw
- To visualize the depth_registered point clouds:
roslaunch openni_launch openni.launch depth_registration:=true
rosrun rviz rviz
See kienct calibration.pdf to view the tutorial of how to calibrate kinect. And note that these codes have been tested on OpenCV 2.4.