A brief documentation on how to install the drivers for using Microsoft Kinect XBOX 360 sensor with ROS Kinetic.
- Installing dependencies:
sudo apt-get install g++ python libusb-1.0-0-dev freeglut3-dev
sudo apt-get install doxygen graphviz mono-complete
sudo apt-get install openjdk-8-jdk
- Intalling OpenNI:
cd ~/
git clone https://github.com/OpenNI/OpenNI.git
cd OpenNI
cd Platform/Linux/CreateRedist
sudo chmod +x RedistMaker
./RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-[xxx]
sudo ./install.sh
- Installing Kinect driver:
cd ~/
git clone git://github.com/ph4m/SensorKinect.git
cd SensorKinect/Platform/Linux/CreateRedist
sudo chmod +x RedistMaker
./RedistMaker
cd ../Redist/Sensor-Bin-Linux-x64-v*
sudo ./install.sh
NOTE: To test whether the driver is correctly installed or not, run: ~/OpenNI/Platform/Linux/Bin/x64-Release/Sample-NiSimpleViewer
- Install freenect_launch which includes launch files to open an OpenNI device:
sudo apt-get install ros-kinetic-freenect-camera ros-kinetic-freenect-launch
- Running Kinect on ROS:
roslaunch freenect_launch freenect.launch depth_registered:=true
- Setup tf tree to visualize the point cloud on rviz:
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 chassis camera_rgb_frame 10
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 camera_rgb_frame camera_rgb_optical_frame 10
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 camera_depth_frame camera_depth_optical_frame 10
- Open rviz to visualize the point cloud
rosrun rviz rviz
Run the following command to visualize the kinect data using rviz:
roslaunch hardware_kinect kinect360_rviz.launch
In order to calibrate the sensor, follow the instructions available here.