[Documentation] [TitleIndex] [WordIndex

Package Summary

Add an indication of scale and compass to images and video streams.


Add an indication of scale and compass to images and video streams.


This package uses OpenCV’s python library to overlay text and overlay, resize, rotate, and warp images.

Quick Start

1. Install:

$ sudo apt-get install ros-kinetic-image-overlay-compass-and-scale

2. Launch node:

$ roslaunch image_overlay_compass_and_scale overlay.launch

3. Publish heading and scale values

$ rostopic pub /heading std_msgs/Float32 45 # unit is degrees
$ rostopic pub /scale std_msgs/Float32 133 # unit is centimeters 

4. View resulting image

$ rqt_image_view /overlay/compressed

Command Line Interface (CLI)

Invoke once using the Command Line Interface (CLI) to save the image overlay to disk instead of publishing to ROS.

$ roscd image_overlay_compass_and_scale
$ ./src/image_overlay_compass_and_scale/image_overlay.py --input-image ~/mars.png --heading 45 --scale-text 133 --output-file output.png

CLI Options

Usage: image_overlay.py [OPTIONS]

--input-image TEXT  Path to input image file  [required]
--heading FLOAT     Current heading relative to north in degrees  [required]
--scale-text FLOAT  The value to be displayed on the right of the scale bar
                    in centimeters  [required]
--output-file TEXT  Output filename to save result to
--help              Show this message and exit.



Subscribed Topics

camera/compressed (sensor_msgs/CompressedImage) heading (std_msgs/Float32) scale (std_msgs/Float32)

Published Topics

overlay/compressed (sensor_msgs/CompressedImage)


~framerate (int, default: 3)

Use Case

Use in the University Rover Competition (URC)

This functionality is needed for the University Rover Competition (URC) and we hope this helps you.

What to expect when nothing is received by the node


2020-01-18 12:42