ROS 公用包学习解析 rgbd_launch

http://blog.sina.com.cn/s/blog_602f87700102wtxu.html
http://blog.sina.com.cn/s/blog_602f87700102wtxu.html
ROS 公用包学习解析<三> rgbd_launch (2017-08-01 11:42:34)

作者: Sam (甄峰) sam_code@hotmail.com

  1. rgbd_launch简介:
    一组打开RGBD设备,并load 所有nodelets去转化 raw depth/RGB/IR 流到 深度图(depth image), 视差图(disparity image)和点云(point clouds)的launch文件集。

这些Launch文件在ROS中,使用RGB-D设备(如Microsoft Kinect, Xtion)。 它创建一个nodelet graph, 把Device Driver中获取Raw Data转换为点云,视差图或其它指定格式。

rgbd_launch包含一系列common launch文件,他们会被driver指定的launch Package使用。Driver指定的Launch Package包括:openni_launch或freenect_launch.

  1. launch 详细分析:
    两个launch文件最重要:
    launch/includes/processing.launch.xml:
    从RGB-D driver (openni_camera, freenect_camera)获取数据,并处理。

launch/kinect_frames.launch:
为Kinect启动TF Tree。 它可以由openni_launch或freenect_launch启动。

1.1:processing.lanch.xml详解:
这个Launch中,可以启动nodelet去转换Raw RGB和depth image到可以使用的信息,如点云。可以使用参数来设置哪些工作可以做。

rgb_processing (bool, default: true)

Launch nodelets for generating raw and rectified monochrome and color images. Given bayer encoded images on the rgb/image_raw topic from the RGB-D driver, the rgb processing chain produces rgb/image_mono,rgb/image_rect_mono, rgb/image_color and rgb/image_rect_color.
控制是否启动nodelet去产生raw Data和校正(rectified)过的单色以及色彩Image。把从RGB-D driver读取的数据以bayer编码RGB编码放入 rgb/image_raw Topic中。同时产生rgb/image_mono,rgb/image_rect_mono, rgb/image_color and rgb/image_rect_color这系列Topic。

如果rgb_processing被设置为True。则$(find rgbd_launch)/launch/includes/rgb.launch.xml

debayer_processing (bool, default: true)

Usage of this parameter requires rgb_processing to be true. Debayers the image into monochrome and color. If set to true then explanation for rgb_processing directly applies. If set to false the rgb processing chain only producesrgb/image_rect_color.

ir_processing (bool, default: true)

If set to true, rectifies the raw IR image (ir/image_raw -> ir/image_rect_raw)
$(find rgbd_launch)/launch/includes/ir.launch.xml

depth_processing (bool, default: true)

Given the raw depth image, rectifies it, converts both the raw and rectified images to metric format (uint16 ->float), and produces a pointcloud. Requires depth/image_raw. Produces depth/image_rect_raw (rectified),depth/image (metric), depth/image_rect (rectified, metric), depth/points (pointcloud).

depth_registered_processing (bool, default: true)

Generates a registered RGBD pointcloud from the device data (requires rgb_processing to be enabled). A pointcloud can be generated through a software registration pipeline (sw_registered_processing = true, used when depth_registration for device driver is set to false ) by registering the depth image from the depth frame to an RGB frame and merging with the RGB image. If software registration is being used, depth_processing needs to be enabled. Alternatively, the device can be directly asked to generate a registered depth image in the RGB frame with can be merged with the RGB Image through the hardware registration pipeline (hw_registered_processing = true, used when depth_registration for device driver is set to true)

disparity_processing (bool, default: true)

Generates a disparity image from unregistered depth data (i.e. in the depth frame). Converts depth/image_rect_rawand projector/camera_info into the disparity image depth/disparity. Requires depth_processing to be enabled.

sw_registered_processing (bool, default: true)

Enables the software registration pipeline. depth/image_rect_raw ->depth_registered/sw_registered/image_rect_raw (registered) -> depth_registered/points ANDdepth_registered/disparity.

hw_registered_processing (bool, default: true)

Enables the hardware registration pipeline. depth/image_raw -> depth_registered/hw_registered/image_rect_raw(rectified) -> depth_registered/points AND depth_registered/disparity.

1.2:其它XML:
rgb.launch.xml:
利用nodelet,启动 image_proc/debayer, image_proc/rectify, image_proc/rectify
换句话说,把Raw Data使用image_proc的nodelet来校准。

depth.launch.xml:
利用nodelet, 启动 image_proc/rectify, depth_image_proc/convert_metric, depth_image_proc/convert_metric, depth_image_proc/point_cloud_xyz。

附1:

RAW RGB与Bayer RGB

对于Sensor来说,Bayer RGB和RAW RGB两者的图象结构都是BG/GR的。(Bayer pattern说的是COLOR FILTER的结构,分为两种:STD Bayer pattern 与Pair pattern,其中STD Bayer pattern的结构是BG/GR的,而Pair Pattern顾名思义是指BGBG/GRGR的结构,即以四行为一个单位,前两行是BG的结构,后两行是GR的结构,这种结构是美光专门为此申请了专利的,主要是在输出TV模式(NTSC/PAL制)时用到).
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值