Software
gstreamer_ros_babel_fish
From github.com/StefanFabian/gstreamer_ros_babel_fish (opens in a new tab)
- Middleware
- Tool
- AGPL-3.0-only
GStreamer elements that bridge ROS 2 image topics with GStreamer pipelines, streaming raw and compressed images in both directions.
Facts
- GitHub stars
- 2read on 28 Nov 2026
- Last update
- 17 Sept 2026Newest commit on main
- Maintenance
- Activea commit in the last 90 days
- Difficulty
- Advanced
Checked on GitHub on 28 Nov 2026.
Licenses
- Code
- AGPL-3.0-only (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (AGPL-3.0-only) at commit 01444de (opens in a new tab), on 16 Oct 2026.
- Commercial use
- Yes
Copyleft: Modified source must be published, also when it runs as a service.
At a glance
- What it is
- Rbfimagesrc subscribes to ROS 2 image topics, accepting raw Image and CompressedImage messages and converting formats automatically.
- Rbfimagesink publishes to ROS 2 topics, choosing raw or compressed messages based on the incoming caps.
- Timestamps are carried through pipelines via GstReferenceTimestampMeta so time information survives processing.
- Both elements offer configurable QoS settings for reliability, durability and history depth.
- The sink can publish camera calibration info from a file or package URL and expose a set_camera_info service.
- Example pipelines include displaying a topic, streaming test video, publishing JPEG streams and streaming a V4L2 camera.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- AGPL-3.0-only. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Active, last commit on 17 Sept 2026.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/StefanFabian/gstreamer_ros_babel_fish (opens in a new tab)
- The version Robotheca read01444de (opens in a new tab)
- Latest releaseNone published on GitHub
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by @StefanFabian, at commit 01444de, under AGPL-3.0-only (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
(opens in a new tab) Image: Quality Gate Status (opens in a new tab) (opens in a new tab) Image: Maintainability Rating (opens in a new tab) (opens in a new tab) Image: Reliability Rating (opens in a new tab) (opens in a new tab) Image: Security Rating (opens in a new tab) (opens in a new tab)
GStreamer ROS 2 Babel Fish
This project provides GStreamer elements for bridging ROS 2 image topics with GStreamer pipelines. It allows for high-performance streaming of image data between ROS 2 and GStreamer, supporting both raw and compressed image formats.
For a detailed understanding of the system's design and component interactions, please refer to the Architecture Overview (opens in a new tab).
Features
- rbfimagesrc: GStreamer source element that subscribes to ROS 2 image topics.
- Supports
sensor_msgs/msg/Image(raw) andsensor_msgs/msg/CompressedImage. - Automatically handles format conversion.
- Configurable QoS settings.
- Supports
- rbfimagesink: GStreamer sink element that publishes to ROS 2 image topics.
- Automatically determines whether to publish
sensor_msgs/msg/Image(raw) orsensor_msgs/msg/CompressedImage(e.g., JPEG, PNG) based on the input caps. - Zero-copy publishing where possible (using shared memory / loaned messages if supported).
- Automatically determines whether to publish
[!NOTE] Both elements use
GstReferenceTimestampMetawithtimestamp/x-unixto attach and recover the timestamp of the ROS image, enabling the processing of image buffers without losing time information (as long as all processing elements preserve it).
Installation
This package is a ROS 2 package. You can build it using colcon.
-
Create a ROS 2 workspace (if you haven't already):
mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src -
Clone the repository:
git clone https://github.com/StefanFabian/gstreamer_ros_babel_fish -
Install dependencies using
rosdep:cd ~/ros2_ws rosdep update rosdep install --from-paths src --ignore-src -r -y -
Build the package:
colcon build --packages-select gstreamer_ros_babel_fish -
Source the workspace:
source install/setup.bash
Usage
After sourcing the workspace again, the GStreamer elements rbfimagesrc and rbfimagesink should be available. You can verify this with:
gst-inspect-1.0 rbfimagesrc
gst-inspect-1.0 rbfimagesink
Example Pipelines
1. Display a ROS Image Topic
Subscribe to a ROS topic /camera/image_raw and display it using autovideosink.
gst-launch-1.0 rbfimagesrc topic=/camera/image_raw ! videoconvert ! autovideosink
2. Stream Video to ROS
Generate a test video pattern and publish it to /test_video.
gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! rbfimagesink topic=/test_video sync=true
3. Publish Compressed Images
Encode video as JPEG and publish to /compressed_video/compressed.
gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! jpegenc ! rbfimagesink topic=/compressed_video sync=true
[!NOTE] When receiving compressed data (image/jpeg, image/png),
rbfimagesinkautomatically publishes to<topic>/compressed.
4. Roundtrip (ROS -> GStreamer -> ROS)
Subscribe to /input_topic, process it (e.g., flip), and publish to /output_topic.
gst-launch-1.0 rbfimagesrc topic=/input_topic ! videoflip method=clockwise ! rbfimagesink topic=/output_topic
5. Using with Compressed Input
Subscribe to a compressed topic /compressed_video/compressed (JPEG), decode it, and display.
gst-launch-1.0 rbfimagesrc determine-framerate=true topic=/compressed_video/compressed ! jpegdec ! videoconvert ! autovideosink
[!NOTE]
rbfimagesrcautomatically detects if the topic is compressed or raw.
6. Stream camera
Stream a V4L2 compatible USB or MIPI-CSI camera.
gst-launch-1.0 v4l2src ! rbfimagesink topic=/camera/image_raw
[!NOTE] On my laptop, this automatically chooses the webcam with the highest resolution as jpeg stream and publishes the jpeg stream directly as
/camera/image_raw/compressedresulting in sub-ms latency.
For information on how to configure v4l2src to use a different device, usegst-inspect-1.0 v4l2src.
Configuration
rbfimagesrc Properties
determine-framerate: Whether to determine the framerate from the topic (default:false)topic: ROS topic to subscribe to (default:/image)node: (Pointer) Externalrclcpp::Nodepointer (optional)node-name: Name of the internal node if no external node is provided (default:rbfimagesrc)qos-reliability:best-effort(default) orreliableqos-durability:volatile(default) ortransient-localqos-history-depth: History depth for subscription (default: 1)wait-frame-count: Number of frames to use for framerate detection (default: 5). Only used ifdetermine-framerateistrue.framerate: Manual framerate to set on the source caps (e.g. "30/1")
rbfimagesink Properties
topic: Base ROS topic name (default:/image)node: (Pointer) Externalrclcpp::Nodepointer (optional)node-name: Name of the internal node if no external node is provided (default:rbfimagesink)frame-id:frame_idto set in the ROS message headercamera-info-url:file://orpackage://URL for camera calibration data. When set, the sink publishes the siblingcamera_infotopic and exposes a siblingset_camera_infoservice.prefer-compressed: Whether to prefer compressed formats during negotiation if both available (default:true)subscription-count: Number of current subscriptions to the topic (read-only)enable-nv-formats: Enable NV formats (NV21, NV24) (default:false)
License
This project is licensed under the GNU Affero General Public License v3.0 (opens in a new tab) - see the LICENSE (opens in a new tab) file for details.
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.