[Documentation] [TitleIndex] [WordIndex

openni_kinect: nite | openni | openni_camera | openni_camera_unstable | openni_tracker

Package Summary

A ROS driver for OpenNI depth (+ RGB) cameras. These include:

  • Microsoft Kinect
  • PrimeSense PSDK
  • ASUS Xtion Pro (no RGB)
The driver publishes the raw depth, RGB, and IR image streams. Nodelets and launch files to convert these to depth images, disparity images, and point clouds are included. Depth and RGB images can be registered using either the factory or user calibration.


This package contains the development version of openni_camera, so that Diamondback users can easily access new features. Note that openni_camera is locked for Diamondback and will be updated only with bug fixes. openni_camera_unstable makes no guarantees of API stability across releases, use at your own risk!

Major new features include:

API breakages from openni_camera:

In E-turtle openni_camera_unstable has become openni_camera.

See openni_kinect/Roadmap for planned future features.


Quick start

Don't forget to build the driver if you've installed from source:

rosmake openni_camera_unstable

Launch the OpenNI driver:

roslaunch openni_camera_unstable 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 depth_registration: openni_reconfigure.png

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

Camera calibration

For instructions on calibrating camera intrinsics, see openni_camera/calibration.

Known issues

<<KforgeTracLink(openni openni_kinect)>>

Launch files

This package provides launch files to load the driver nodelet and various data processing nodelets as a coordinated system.


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.


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) calibration_dir (string, default: /tmp) rgb_calibration (string, default: <calibration_dir>/calibration_%s.yaml) depth_calibration (string, default: <calibration_dir>/calibration_%s.yaml) rgb (string, default: rgb) ir (string, default: ir) depth (string, default: depth) depth_registered (string, default: depth_registered)

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)
These 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: 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)


camera/rgb/set_camera_info (sensor_msgs/SetCameraInfo) camera/ir/set_camera_info (sensor_msgs/SetCameraInfo)


Dynamically Reconfigurable Parameters
See the dynamic_reconfigure package for details on dynamically reconfigurable parameters. ~image_mode (int, default: 2) ~debayering (int, default: 1) ~depth_mode (int, default: 2) ~depth_registration (bool, default: False) ~depth_time_offset (double, default: 0.0) ~image_time_offset (double, default: 0.0)

Provided tf Transforms



Reference documentation coming.


Reference documentation coming.

2019-07-13 12:56