Show EOL distros: 

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.

openni_launch

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.

openni_launch

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.

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.

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.

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.

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.

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.

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.

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.

openni_launch was introduced in Electric. Select a newer distro above.

New in Fuerte openni_launch is now a unary stack. In Electric it was a package in openni_kinect.

概要

このパッケージはOpenNIで動作するMicrosoft Kinectのようなデバイスの利用に必要なlaunchファイルを含んでいます.このパッケージが作るnodeletグラフを使うことで,デバイスからのデータを,ポイントクラウド,画像などの可視化や処理にふさわしい形に変換できます.

Point cloud

動作させてみる

OpenNIのドライバを実行します.これは全てのnodeletsを実行します:

roslaunch openni_launch openni.launch

可視化のために下記コマンドでrvizを実行します:

rosrun rviz rviz

rvisウィンドウ左上にあるFixed Frameを/camera_depth_optical_frameにします.

DisplayにPointCloud2を追加し,topicを/camera/depth/pointsに設定します.これにより灰色の立体画像が画面に表示されます.これは色が重ね合わせられていない,赤外線カメラの深さ画像のポイントクラウドです.

この情報は2次元画像としても見ることができます:

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

さあ,RGBデータと統合された色付きのポイントクラウドを見てみましょう.

再調整GUIを開きます:

rosrun rqt_reconfigure rqt_reconfigure

GUIのドロップダウンメニューで/camera/driverを選択します. depth_registrationのチェックボックスを有効にします.

rvisに戻り,PointCloud2のtopicを/camera/depth_registered/pointsにします. Color TransformerをRGB8にします. これにより,カラーの3次元ポイントクラウドが見れるはずです.

下記のコマンドでも重ね合わせられた画像を見ることができます:

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

rvis以外でもRGB画像を見ることができます:

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

グレースケールはこちら:

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

openni_lauch実行中のエラー

openni_launch実行中に下記のエラーが発生します:

[ERROR] [1351028964.484342461]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressedDepth/set_parameters]
[ERROR] [1351028964.489915028]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]
[ERROR] [1351028964.495383139]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]

このエラーはdepth_registered/image_rect_rawを2つの情報源から作成しようとするので発生します. (Registrationの章を参照).image_transportが1つの画像から複数のサービスを発行し,今回それが干渉しています.このエラーはドライバに対する機能的な影響は無く,処理時間もほとんど無視できます.(http://answers.ros.org/question/12244/complaint-from-openni_launch-on-already-advertised-services/)

Registration

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

If OpenNI registration is enabled:

  • The unregistered camera/depth/* topics are not published.

  • The raw depth image from OpenNI is published in camera/depth_registered instead.

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

  • camera/depth_registered/image_raw is computed from camera/depth/image_raw using the camera instrinsics and transform between them.

  • Both registered and unregistered depth outputs are published.
  • This will cost more CPU cycles, since the registration has to be done in software.

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)

  • Descriptive name for your device. All published topics are pushed down into the <camera> namespace, and this also affects tf frame ids and some node names. If you are using multiple cameras, use this argument to disambiguate them.
Device driver
device_id (string, default: #1)
  • Specifies which device to open. The following formats are recognized:
    • #1 Use first device found
      2@3 Use device on USB bus 2, address 3
      B00367707227042B Use device with given serial number
rgb_camera_info_url (string, default: file://${ROS_HOME}/camera_info/${NAME}.yaml)
  • Calibration URL for the RGB camera. By default, looks in your ROS home directory for calibration identified by the device serial number, e.g. $HOME/.ros/camera_info/rgb_B00367707227042B. If no calibration is found, uses a default camera model with a typical focal length and distortion unmodeled.
depth_camera_info_url (string, default: file://${ROS_HOME}/camera_info/${NAME}.yaml)
  • Calibration URL for the IR/depth camera. By default, looks in your ROS home directory for calibration identified by the device serial number, e.g. $HOME/.ros/camera_info/depth_B00367707227042B. If no calibration is found, uses a default camera model with the focal length reported by OpenNI and distortion unmodeled.

depth_registration (bool, default: false)

  • If true, use OpenNI's factory-calibrated depth->RGB registration.
load_driver (bool, default: true)
  • If true, load the OpenNI device driver. Set to false if raw data is provided by another source, e.g. bag file playback.

tf frames
rgb_frame_id (string, default: /<camera>_rgb_optical_frame)
  • The tf frame id of the RGB camera.
depth_frame_id (string, default: /<camera>_depth_optical_frame)
  • The tf frame id of the IR camera.

publish_tf (bool, default: true)

  • If true, publish the default (uncalibrated) tf tree. Set to false if extrinsics are provided by another source, e.g. calibration or bag file playback.

Remapping
rgb (string, default: rgb)
  • Remap the rgb namespace.
ir (string, default: ir)
  • Remap the ir namespace.
depth (string, default: depth)
  • Remap the depth namespace.
depth_registered (string, default: depth_registered)
  • Remap the depth_registered namespace.
projector (string, default: projector)
  • Remap the projector namespace.
Launch configuration
debug (bool, default: false)
  • If true, launches nodelet manager in GDB for debugging.

respawn (bool, default: false)

  • If true, enables bond topics between nodelet loaders and the managers and respawns any nodes (manager or loader) that die. This makes the system robust to any node dying, but the proliferation of bond topics can overwhelm introspection tools like rxgraph.

Published Topics

RGB camera
camera/rgb/camera_info (sensor_msgs/CameraInfo)
  • Camera calibration and metadata.
camera/rgb/image_raw (sensor_msgs/Image)
  • Raw image from device. Format is Bayer GRBG for Kinect, YUV422 for PSDK.
camera/rgb/image_mono (sensor_msgs/Image)
  • Monochrome unrectified image.
camera/rgb/image_color (sensor_msgs/Image)
  • Color unrectified image.
camera/rgb/image_rect (sensor_msgs/Image)
  • Monochrome rectified image.
camera/rgb/image_rect_color (sensor_msgs/Image)
  • Color rectified image.
Depth camera
camera/depth/camera_info (sensor_msgs/CameraInfo)
  • Camera calibration and metadata.
camera/depth/image_raw (sensor_msgs/Image)
  • Raw image from device. Contains uint16 depths in mm.
camera/depth/image (sensor_msgs/Image)
  • Unrectified depth image. Contains float depths in m.
camera/depth/image_rect (sensor_msgs/Image)
  • Rectified depth image. Contains float depths in m.
camera/depth/disparity (stereo_msgs/DisparityImage)
  • Disparity image (inversely related to depth), for interop with stereo processing nodes.
camera/depth/points (sensor_msgs/PointCloud2)
  • XYZ point cloud. If using PCL, subscribe as PointCloud<PointXYZ>.
Registered depth camera (aligned with RGB camera)
See Registration.
camera/depth_registered/camera_info (sensor_msgs/CameraInfo)
  • Camera calibration and metadata. Same as camera/rgb/camera_info but time-synced to depth images.
camera/depth_registered/image_raw (sensor_msgs/Image)
  • Raw image from device. Contains uint16 depths in mm.
camera/depth_registered/image (sensor_msgs/Image)
  • Unrectified depth image. Contains float depths in m.
camera/depth_registered/image_rect (sensor_msgs/Image)
  • Rectified depth image. Contains float depths in m.
camera/depth_registered/disparity (stereo_msgs/DisparityImage)
  • Disparity image (inversely related to depth), for interop with stereo processing nodes.
camera/depth_registered/points (sensor_msgs/PointCloud2)
  • XYZRGB point cloud. If using PCL, subscribe as PointCloud<PointXYZRGB>.
IR camera
camera/ir/camera_info (sensor_msgs/CameraInfo)
  • Camera calibration and metadata.
camera/ir/image_raw (sensor_msgs/Image)
  • Raw uint16 IR image.
camera/ir/image_rect (sensor_msgs/Image)
  • Rectified IR image.
IR projector
camera/projector/camera_info (sensor_msgs/CameraInfo)
  • Faked calibration for the IR projector. Identical to depth/camera_info, but with the baseline encoded in the P matrix. Stereo processing nodes can use the depth and projector infos as a left/right pair.

Provided tf Transforms

/<camera>_rgb_optical_frame/<camera>_depth_optical_frame
  • Default estimate for the transform between the RGB and IR cameras. If OpenNI registration is disabled, this is used with the calibrated camera intrinsics to perform registration.

Wiki: ja/openni_launch (last edited 2013-05-23 14:12:33 by AsukiKono)