[Documentation] [TitleIndex] [WordIndex

The Diamondback OpenNI driver API is deprecated as of Fuerte. For migration help and API reference, see openni_camera_deprecated.

Kinect Accuracy and Precision

openni_kinect/kinect_accuracy

Kinect Calibration

openni_camera/calibration

OpenNI Demo

Don't forget to build the driver if you haven't already done so:

rosmake openni_camera

Launch the OpenNI driver:

roslaunch openni_camera openni_node.launch

To view in rviz, launch rviz:

rosrun rviz rviz

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

Add a Point Cloud2 display, and set the topic to /camera/rgb/points.

Turning the background to light gray can help with viewing.

To view the color image in image_viewer:

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

or following to view the grayscale image:

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

Changing driver settings

start dynamic_reconfigure

rosrun dynamic_reconfigure reconfigure_gui

select /openni_node1. You should see something like this:

dynamic_reconfigure.jpg

  1. image mode:
    • Kinect supports natively just SXGA@15Hz, which actually streams ~10Hz, and VGA@30Hz. All other modes at 30Hz are down sampled in the driver and modes at 25Hz are not supported by the Kinect.
    • Primesense device does not support SXGA yet, but all VGA and QVGA modes - only QQVGA is down sampled by the driver.
  2. debayering: Only valid for Kinect, since Primesense device streams uses YUV.
    • Bilinear: A fast debayering algorithm, but poor results on edges.
    • EdgeAware: uses linear interpolation only in direction with lowest gradient. (recommended)

    • EdgeAwareWeighted: uses bilinear interpolation weighted with the according gradient.

    • Note: for down sampled images, the debayering is done on a 2x2 block.
  3. depth mode: same as image mode, except no SXGA is supported.
  4. depth_registration: whether the depth image should be registered to the RGB image or not.
    • Note: if registration is turned on, the point clouds are in the '/openni_rgb_optical_frame', otherwise they are in '/openni_depth_optical_frame'.
    • Note: subscribing to /camera/rgb/points turns on registration automatically and can not turned if any nodes subscribe to that topic.
  5. depth_time_offset: Since the device does not return a time stamp which is synchronized with system clock, there is a delay between the capturing time and the time where the ROS message is created. This value can be used to add an offset time to the ROS message time stamp.
  6. image_time_offset: similar to depth_time_offset

Synchronization

Other than the Primesense devices, the Kinect does not support hardware synchronization. Thus the time points where the RGB image and the depth image are captured may be up to ~16ms away from each other. For all devices we use a Approximatetimesynchronizer to generate the point clouds /camera/rgb/points. For Primesense devices the hardware synchronization is turned on automatically if both streams are used (subscribing to image + depth).

Coordinate Frames

As per REP103 the following coordinate frames are layed out for the kinect/Primesense Reference Device

/openni_camera
|
|> /openni_rgb_frame
|  |
|  |> /openni_rgb_optical_frame  (Z forward)
|
|> /openni_depth_frame
   |
   |> /openni_depth_optical_frame (Z forward)

2022-05-28 12:50