image_transport Documentation

本文深入讲解了ROS(Robot Operating System)中图像传输的实现方式,包括如何使用image_transport的类替代传统的ros::Publisher和ros::Subscriber进行图像发布与订阅。此外,文章还介绍了用于同步图像和相机信息的CameraPublisher与CameraSubscriber,以及适用于复杂同步需求的SubscriberFilter。

http://docs.ros.org/api/image_transport/html/

Code API
When transporting images, you should use image_transport’s classes as drop-in replacements for ros::Publisher and ros::Subscriber.

image_transport::ImageTransport - use this to create a Publisher or Subscriber
image_transport::Publisher - manage advertisements for an image topic, using all available transport options
image_transport::Subscriber - manage an Image subscription callback using a particular transport
Camera drivers publish a “camera_info” sibling topic containing important metadata on how to interpret an image for vision applications. image_transport included helper classes to publish (image, info) message pairs and re-synchronize them on the client side:

image_transport::CameraPublisher - manage advertisements for camera images
image_transport::CameraSubscriber - manage a single subscription callback to synchronized image (using any transport) and CameraInfo topics
For other synchronization or filtering needs, see the low-level filter class:

image_transport::SubscriberFilter - a wrapper for image_transport::Subscriber compatible with message_filters

<?xml version="1.0"?> <package format="2"> <name>ground_projection</name> <version>0.0.0</version> <description>The map_intergration package</description> <!-- One maintainer tag required, multiple allowed, one person per tag --> <!-- Example: --> <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> <maintainer email="pf@todo.todo">pf</maintainer> <!-- One license tag required, multiple allowed, one license per tag --> <!-- Commonly used license strings: --> <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> <license>TODO</license> <!-- Url tags are optional, but multiple are allowed, one per tag --> <!-- Optional attribute type can be: website, bugtracker, or repository --> <!-- Example: --> <!-- <url type="website">http://wiki.ros.org/map_intergration</url> --> <!-- Author tags are optional, multiple are allowed, one per tag --> <!-- Authors do not have to be maintainers, but could be --> <!-- Example: --> <!-- <author email="jane.doe@example.com">Jane Doe</author> --> <!-- The *depend tags are used to specify dependencies --> <!-- Dependencies can be catkin packages or system dependencies --> <!-- Examples: --> <!-- Use depend as a shortcut for packages that are both build and exec dependencies --> <!-- <depend>roscpp</depend> --> <!-- Note that this is equivalent to the following: --> <!-- <build_depend>roscpp</build_depend> --> <!-- <exec_depend>roscpp</exec_depend> --> <!-- Use build_depend for packages you need at compile time: --> <!-- <build_depend>message_generation</build_depend> --> <!-- Use build_export_depend for packages you need in order to build against this package: --> <!-- <build_export_depend>message_generation</build_export_depend> --> <!-- Use buildtool_depend for build tool packages: --> <!-- <buildtool_depend>catkin</buildtool_depend> --> <!-- Use exec_depend for packages you need at runtime: --> <!-- <exec_depend>message_runtime</exec_depend> --> <!-- Use test_depend for packages you need only for testing: --> <!-- <test_depend>gtest</test_depend> --> <!-- Use doc_depend for packages you need only for building documentation: --> <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <build_depend>geometry_msgs</build_depend> <build_depend>nav_msgs</build_depend> <build_depend>pcl_conversions</build_depend> <build_depend>pcl_ros</build_depend> <build_depend>roscpp</build_depend> <build_depend>rospy</build_depend> <build_depend>sensor_msgs</build_depend> <build_depend>std_msgs</build_depend> <build_depend>tf2_ros</build_depend> <build_depend>tf2</build_depend> <build_depend>cv_bridge</build_depend> <build_depend>image_transport</build_depend> <build_export_depend>geometry_msgs</build_export_depend> <build_export_depend>nav_msgs</build_export_depend> <build_export_depend>pcl_conversions</build_export_depend> <build_export_depend>pcl_ros</build_export_depend> <build_export_depend>roscpp</build_export_depend> <build_export_depend>rospy</build_export_depend> <build_export_depend>sensor_msgs</build_export_depend> <build_export_depend>std_msgs</build_export_depend> <build_export_depend>tf2</build_export_depend> <build_export_depend>tf2_ros</build_export_depend> <build_export_depend>cv_bridge</build_export_depend> <build_export_depend>image_transport</build_export_depend> <exec_depend>geometry_msgs</exec_depend> <exec_depend>nav_msgs</exec_depend> <exec_depend>pcl_conversions</exec_depend> <exec_depend>pcl_ros</exec_depend> <exec_depend>roscpp</exec_depend> <exec_depend>rospy</exec_depend> <exec_depend>sensor_msgs</exec_depend> <exec_depend>std_msgs</exec_depend> <exec_depend>tf2</exec_depend> <exec_depend>tf2_ros</exec_depend> <exec_depend>cv_bridge</exec_depend> <exec_depend>image_transport</exec_depend> <!-- The export tag contains other, unspecified, tags --> <export> <!-- Other tools can request additional information be placed here --> </export> </package> 注释上述代码
09-09
翻译如下注释 /*! \mainpage * * \section intro_sec Introduction * * This is an API specification document for Microsemi Voice Processor Class of * Device SDK. This document covers platform-independent Host * Bus Interface(HBI) And platform-dependent System Service Layer(SSL). * HBI API are implemented over SSL. * Below Diagram gives an overview of different components in system * * \image html vproc_sdk_flow.png "Microsemi VPROC SDK FLOW" * \image latex vproc_sdk_flow.eps "Microsemi VPROC SDK FLOW" width=\textwidth,height=\textheight/2 * * Microsemi only define System Service Layer as an abstract API set . It should * be ported by developer responsible for porting HBI Driver for a particular host platform. * HBI Driver and Microsemi VPROC SDK is assisted by various compile-time options * which gives flexibility to host to configure Microsemi Voice Processor Device * and software as per their system requirement ex. SPI/I2C, endianness, memory resources. * Below tables summarizes both HBI and System-wide various compile time options * \image html hbi_options.png "Microsemi HBI Compile Time Options" * \image latex hbi_options.eps "Microsemi HBI Compile Time Options" width=\textwidth,height=\textheight/4 * \image html vproc_sdk_options.png "Microsemi VPROC SDK Compile Time Options" * \image latex vproc_sdk_options.eps "Microsemi VPROC SDK Compile Time Options" width=\textwidth,height=\textheight/2 * * \defgroup hbi Host Bus Interface * Host Bus Interface define control path communication to Microsemi VPROC Devices. * * Microsemi VPROC device control path communcation is divided in to transport * and physical layer where Transport Layer sits on top of Physical Layer. * Physical layer define actual bus protocol to use at ground level.Current * Microsemi VPROC Devices support SPI and I2C as physical interface. * Transport layer define a device specific protocol and termed as * Host Bus Interface (HBI). * Following section covers API of HBI Driver to configure VPROC Devices. * * \defgroup ssl System Service Layer * System Service Layer is Platform specific Abstraction Layer. * * This layer prototypes API and data structures. It should be implemented by * developer responsible for porting HBI driver over host platform.
最新发布
10-25
/* * Copyright (c) 2013, Willow Garage, Inc. * Copyright (c) 2016, Orbbec Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Willow Garage, Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * Author: Tim Liu (liuhua@orbbec.com) */ #include "astra_camera/astra_driver.h" int main(int argc, char **argv){ ros::init(argc, argv, "astra_camera"); ros::NodeHandle n; ros::NodeHandle pnh("~"); astra_wrapper::AstraDriver drv(n, pnh); ros::spin(); return 0; }
07-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值