[Documentation] [TitleIndex] [WordIndex

Package Summary

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

Overview

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

Overlay

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]

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
                    [default='output.png']
--help              Show this message and exit.

Nodes

image_overlay_compass_and_scale

Subscribed Topics

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

Published Topics

overlay/compressed (sensor_msgs/CompressedImage)

Parameters

~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

Overlay


2019-07-13 12:42