Table of Contents

Perception Tutorial

Tutorial describing first steps needed to start processing data from the Kinect, in the form of Point Clouds, using tools included in ROS Fuerte.

1. Prerequisite

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/.

2. Viewing and recording data from the Kinect

Bag files and Rviz

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
Image_view

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
From a ROS node

To see how you subscribe to a topic from a ros node take a look at subscriber.cpp from the source code.

3.Processing Point Clouds

The following are presented in tutorial.cpp, for more detailed description check the links attached.

For further questions contact: balintbe at tzi dot de