Tutorial describing first steps needed to start processing data from the Kinect, in the form of Point Clouds, using tools included in ROS Fuerte.
Follow the steps described in Recommended procedure for installing ROS and Getting Started with ROS
If you are using a PrimeSense device (Xbox Kinect, Asus Xtion) check whether ros-fuerte-openni-kinect is installed. You can do this by running the following command in a terminal:
dpkg -l | grep ros-fuerte-openni-kinect
If not present install using:
sudo apt-get install ros-fuerte-openni-kinect
Check out the code presented at seminar in your ros-workspace from:
https://github.com/ai-seminar/perception-tutorials.git
Prerecorded bag file can be found in ../tutorial_pkg/data/.
For a PrimeSense device: connect it to your PC and run:
roslaunch openni_launch openni.launch
Run rviz:
rosrun rviz rviz
Add a new PointCloud2 display type to rviz, and choose /camera/depth_registered_points in the topics field. If rviz returns errors, change Fixed Frame in Global Options from <Filxed Frame> to one of the available ones in the dropdown list (e.g. /camera_link)
Use rosbag to record data in a bag file, e.g.:
rosbag record /camera/depth_registered/points /tf
Note: /tf is needed if you want to view the recorded data using rviz. Play back a bag file using:
rosbag play filename.bag --loop
More detail and a more elegant way of saving data from a Kinect to bag files can be found here
In order to save Point Clouds to *.pcd files run:
rosrun pcl_ros pointcloud_to_pcd /input:=/camera/depth_registered/points
View rgb image:
rosrun image_view image_view image:=/camera/rgb/image_color
View depth image:
rosrun image_view image_view image:=/camera/depth/image
To see how you subscribe to a topic from a ros node take a look at subscriber.cpp from the source code.
The following are presented in tutorial.cpp, for more detailed description check the links attached.
For further questions contact: balintbe at tzi dot de