Friday, June 8, 2012

Getting the Kinect to Work

This post is about how I got kinect to work on my machine which is Ubuntu 10.04 Lucid using ROS
What didn't Work:
I was trying to get Kinect for Windows working on my system but apparently it's not supported by Open NI drivers. Find the discussion about it here: http://answers.ros.org/question/12876/kinect-for-windows/ . I then installed a Windows 7 virtual environment using VMplayer. Microsoft released SDK for windows which is pretty cool. You can download the SDK from here. I was really hoping for it to work but came to know that current version of SDK doesn't support virtual environments yet. You can find some discussion here. http://social.msdn.microsoft.com/Forums/br/kinectsdk/thread/86528a22-0643-4a1f-819f-8125d7668a68 I didn't want to do a dual boot and started exploring other options. 
What works:
Open NI does support the older Xbox 360 sensor, which we had in the lab. I tried it out and it worked perfect (close to). Major steps are outlined as follows
1) Install ROS. I installed fuerte for which you can find the installation directions here for Ubuntu.
2) Install Open NI drivers using apt-get install ros-fuerte-openni-kinect or follow the directions here.

That's it and you are done. To launch Xbox 360 sensor use
 roslaunch openni_launch openni.launch . You will see in command window
 [ INFO] [1339168119.174802439]: Number devices connected: 1
[ INFO] [1339168119.174938804]: 1. device on bus 002:21 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'B00367200497042B'
If you want to visualize the rgb image, you can use 
rosrun image_view image_view image:=/camera/rgb/image_color
For depth image use
rosrun image_view disparity_view image:=/camera/depth_registered/disparity

If you want to save data using kinect, follow the instruction here.
Additionally you can install rviz which is visualization utility with ros using
sudo apt-get install ros-fuerte-visualization 
 You can visualize RGB image, depth image, point cloud using Rviz.  
Some more things to do are to import this data into MATLAB by following the tutorial here .
Also I want to use PCL  because they have pretty neat things in there. 

If you have any questions or feedback, please comment below. If you are interested in my work follow my website (just beginning to make it)


No comments:

Post a Comment