I recently setup a Kinect with ROS for SLAM but the instructions are all spread out. So, in this tutorial we go through the steps required to setup a Microsoft Kinect with ROS and do some cool live 3D SLAM with the kinect and RGBD SLAM algorithm.
Tested Configuration: Ubuntu 14.04 LTS, ROS Indigo, Kinect Model 1473 (Kinect for Xbox 360 purchased in 2014)
Installing and configuring:
- Install libfreenect and required packages to run kinect:
$sudo apt-get install ros-indigo-freenect-launch ros-indigo-openni-launch libfreenect-dev
- Source your ROS setup:
$source /opt/ros/indigo/setup.bash
- Create a catkin workspace if you don’t have one with instructions here.
- Setup rosdep with instructions here.
- Clone RGBDSLAM V2 from here into the ~/catkin_ws/src directory.
$cd ~/catkin_ws
$source devel/setup.bash
- Install RGBD SLAM dependencies:
$rosdep install rgbdslam
- Make RGBD-SLAM: $
catkin_make
Running:
- Open 3 terminal windows.
- In the first we run the ros core server:
$roscore
- In the second we launch the kinect driver:
$roslaunch freenect_launch freenect.launch
- In the third we launch RGBD SLAM:
$roslaunch rgbdslam rgbdslam.launch