[Documentation] [TitleIndex] [WordIndex

openni_kinect: depth_image_proc | nite | openni | openni_camera | openni_launch | openni_tracker

Package Summary

Launch files to open an OpenNI device and load all nodelets to convert raw depth/RGB/IR streams to depth images, disparity images, and (registered) point clouds.

New in ROS Electric

Overview

This package contains launch files for using OpenNI-compliant devices such as the Microsoft Kinect in ROS. It creates a nodelet graph to transform raw data from the device driver into point clouds, disparity images, and other products suitable for processing and visualization.

Quick start

Launch the OpenNI driver:

roslaunch openni_launch openni.launch

To visualize in rviz:

rosrun rviz rviz

Set the Fixed Frame (top left of rviz window) to /camera_depth_optical_frame.

Add a PointCloud2 display, and set the topic to /camera/depth/points. Turning the background to light gray can help with viewing. This is the unregistered point cloud in the frame of the depth (IR) camera. It is not matched with the RGB camera images.

Alternatively you can view the disparity image:

rosrun image_view disparity_view image:=/camera/depth/disparity

Now let's look at a registered point cloud, aligned with the RGB data. Open the dynamic reconfigure GUI:

rosrun dynamic_reconfigure reconfigure_gui

And select /camera/driver from the drop-down menu. Enable the depth_registration checkbox.

Now go back to rviz, and change your PointCloud2 topic to /camera/depth_registered/points. Set Color Transformer to RGB8. You should see a color, 3D point cloud of your scene.

Again, you can view the registered disparity image:

rosrun image_view disparity_view image:=/camera/depth_registered/disparity

To view the color image from the RGB camera outside of rviz:

rosrun image_view image_view image:=/camera/rgb/image_color

or to view the grayscale image:

rosrun image_view image_view image:=/camera/rgb/image_mono

Registration

The depth_registered/* topics can be produced in two ways.

If OpenNI registration is enabled:

If OpenNI registration is disabled and you have calibrated the cameras to each other:

Launch files

openni.launch

Launches in one process the device driver and many processing nodelets for turning the raw RGB and depth images into useful products, such as point clouds. Provides default tf tree linking the RGB and depth cameras.

Arguments

camera (string, default: camera) device_id (string, default: #1) rgb_frame_id (string, default: /<camera>_rgb_optical_frame) depth_frame_id (string, default: /<camera>_depth_optical_frame) rgb_camera_info_url (string, default: file://${ROS_HOME}/camera_info/${NAME}.yaml) depth_camera_info_url (string, default: file://${ROS_HOME}/camera_info/${NAME}.yaml) rgb (string, default: rgb) ir (string, default: ir) depth (string, default: depth) depth_registered (string, default: depth_registered) debug (bool, default: false)

Published Topics

RGB camera
camera/rgb/camera_info (sensor_msgs/CameraInfo) camera/rgb/image_raw (sensor_msgs/Image) camera/rgb/image_mono (sensor_msgs/Image) camera/rgb/image_color (sensor_msgs/Image) camera/rgb/image_rect (sensor_msgs/Image) camera/rgb/image_rect_color (sensor_msgs/Image)
Depth camera
camera/depth/camera_info (sensor_msgs/CameraInfo) camera/depth/image_raw (sensor_msgs/Image) camera/depth/image (sensor_msgs/Image) camera/depth/image_rect (sensor_msgs/Image) camera/depth/disparity (stereo_msgs/DisparityImage) camera/depth/points (sensor_msgs/PointCloud2)
Registered depth camera (aligned with RGB camera)
See Registration. camera/depth_registered/camera_info (sensor_msgs/CameraInfo) camera/depth_registered/image_raw (sensor_msgs/Image) camera/depth_registered/image (sensor_msgs/Image) camera/depth_registered/image_rect (sensor_msgs/Image) camera/depth_registered/disparity (stereo_msgs/DisparityImage) camera/depth_registered/points (sensor_msgs/PointCloud2)
IR camera
camera/ir/camera_info (sensor_msgs/CameraInfo) camera/ir/image_raw (sensor_msgs/Image) camera/ir/image_rect (sensor_msgs/Image)

Provided tf Transforms

/<camera>_rgb_optical_frame/<camera>_depth_optical_frame


2011-11-19 12:28