Wiki

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.

Starting with ROS Hydro, all the functionality of openni_launch has been moved to rgbd_launch, in order to allow other drivers such as libfreenect (freenect_launch) to use the same code. openni_launch itself contains 1 launch file:

Quick start

Launch the OpenNI driver. This will launch the full constellation of nodelets:

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 rqt_reconfigure rqt_reconfigure

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

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

This section only covers arguments that are specific to openni_launch. There are also some common arguments that can be supplied to openni.launch that are documented with rgbd_launch.

camera (string, default: camera)

Device driver
device_id (string, default: #1) 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)

depth_registration (bool, default: false)

load_driver (bool, default: true)

tf frames
rgb_frame_id (string, default: /<camera>_rgb_optical_frame) depth_frame_id (string, default: /<camera>_depth_optical_frame)

publish_tf (bool, default: true)

tf_prefix (string, default: "")

Remapping
rgb (string, default: rgb) ir (string, default: ir) depth (string, default: depth) depth_registered (string, default: depth_registered) projector (string, default: projector)
Launch configuration
debug (bool, default: false)

respawn (bool, default: false)

num_worker_threads (int, default: 4)

This section only covers arguments that are specific to openni_launch. There are also some common arguments that can be supplied to openni.launch that are documented with rgbd_launch.

Published Topics

Please consult the documentation at rgbd_launch.

Wiki: openni_launch/hydro (last edited 2013-11-14 22:21:53 by PiyushKhandelwal)