Note: This tutorial assumes that you have completed the previous tutorials: ROS tutorials.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Managing Transport Plugins

Description: This tutorial covers how to discover which transport plugins are included in your system and make them available for use. No programming required!

Tutorial Level: BEGINNER

Finding available transports

image_transport searches your ROS installation for transport plugins at runtime and dynamically loads all that are built. This affords you great flexibility in adding additional transports, but makes it unclear which are available on your system. image_transport provides a list_transports executable for this purpose:

$ rosrun image_transport list_transports
Declared transports:
image_transport/compressed (*): Not available. Try 'rosmake compressed_image_transport'.
image_transport/compressedDepth (*): Not available. Try 'rosmake compressed_depth_image_transport'.
image_transport/raw
image_transport/theora (*): Not available. Try 'rosmake theora_image_transport'.

Details:
----------
"image_transport/compressed"
*** Plugins are not built. ***
 - Provided by package: compressed_image_transport
 - Publisher: This plugin publishes a CompressedImage using either JPEG or PNG compression.
 - Subscriber: This plugin decompresses a CompressedImage topic.
----------
"image_transport/compressedDepth"
*** Plugins are not built. ***
 - Provided by package: compressed_depth_image_transport
 - Publisher: This plugin publishes a compressed depth images using PNG compression.
 - Subscriber: This plugin decodes a compressed depth images.
----------
"image_transport/raw"
 - Provided by package: image_transport
 - Publisher: This is the default publisher. It publishes the Image as-is on the base topic.
 - Subscriber: This is the default pass-through subscriber for topics of type sensor_msgs/Image.
----------
"image_transport/theora"
*** Plugins are not built. ***
 - Provided by package: theora_image_transport
 - Publisher: This plugin publishes a video packet stream encoded using Theora.
 - Subscriber: This plugin decodes a video packet stream encoded using Theora.

This the expected output for an otherwise new ROS installation after completing the previous tutorials. Depending on your setup, you may already have "theora" or other transports available.

The first lines of output list "Declared transports" in your ROS system. "compressed" and "raw" we have seen in the previous tutorials. "theora" is new, and the asterisk next to its name indicates that list_transports was unable to load the corresponding plugins.

In the "Details" section, we can see what packages provide the various transports, short descriptions of the plugins, whether a plugin failed to load (and why), and (if applicable) suggestions for troubleshooting.

Adding new transports

Let's add "theora" streaming video support to all ROS applications using image_transport to send images. The easiest is to isntall packages:

$ sudo apt-get install ros-indigo-theora-image-transport

But you can also build from source.

For rosbuild you need to execute:

$ rosmake theora_image_transport

For catkin, just follow the instructions and build the packages in the workspace in which they exist and source the resulting setup.*sh file.

Wiki: image_transport/Tutorials/ManagingPlugins (last edited 2014-10-28 22:09:54 by VincentRabaud)