broadcast

This file is ai generated. Do not edit this file directly. Instead, edit the node source code and run the generate-node-docs command to update this file.

Description

Test node that broadcasts images from files to a specified topic. The node cycles through a list of image files, publishing each one as both a regular and compressed ROS2 image message at 1 Hz. This is useful for testing image processing pipelines with static images.

Publishers

Parameters

The node accepts command-line arguments (not ROS2 parameters):

  • Topic name (required): The topic on which to publish the images

  • Image filenames (required): One or more paths to image files to broadcast

Example Usage

Broadcast a single image to a topic:

ros2 run opencv_tests broadcast /test_images /path/to/image1.jpg

Broadcast multiple images in a loop:

ros2 run opencv_tests broadcast /camera/image /path/to/image1.jpg /path/to/image2.png /path/to/image3.jpg

The node will cycle through the provided images, publishing each one for 1 second before moving to the next. After the last image, it returns to the first image and continues looping.