## repository: https://github.com/danielsnider/image_overlay_compass_and_scale <> <> == Overview == Add an indication of scale and compass to images and video streams. {{attachment:mars.png|Overlay|width="500"}} 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 == {{{ #!clearsilver CS/NodeAPI name = image_overlay_compass_and_scale pub { 0.name = overlay/compressed 0.type = sensor_msgs/CompressedImage 0.desc = The resulting image overlaid with scale and compass indicators. } sub { 0.name = camera/compressed 0.type = sensor_msgs/CompressedImage 0.desc = Image topic that will be overlaid with with scale and compass indicators. 1.name = heading 1.type = std_msgs/Float32 1.desc = Current heading relative to north in degrees. 2.name = scale 2.type = std_msgs/Float32 2.desc = The value to be displayed on the right of the scale bar in centimeters. } param { 0.name = ~framerate 0.type = int 0.desc = The rate at which to publish an image overlaid with scale and compass indicators. 0.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 == {{attachment:default.png|Overlay|width="500"}}