rospypavumeter

Overview

Analog VU meter developed using the PulseAudio library, using a Python wrapper of the original C library. Composed by one node, vumeter_node, explained below.

Run

Example of a launcher for a vumeter node. For more information try to run the node using rosrun

$ rosrun rospypavumeter vumeter -h

For running using roslaunch

$ roslaunch rospypavumeter levels_monitor.launch robot:=<robot_name>

ROS API

Nodes

vumeter_node

Analog VU meter connected to Linux sound system, PulseAudio, allowing any sound output (or "sink" in PulseAudio's nomenclature) to be monitored. The main PulseAudio API is asynchronous and callback based, and the documentation is primarly just an API reference. To help with volume meter style applications, PulseAudio even allows you to ask for peak level measurements, which means you can sample the monitor sink at a low frequency, with low CPU utilisation, but still producing a useful volume display. When this feature is used, each sample read indicates the peak level since the last sample. This program is designed to detect whatever sink is active in any moment in a dynamic manner, instead of previous implementations which have this parameter harcoded, and read the stream of audio coming from it, publishing through ROS protocol the detected peaks.

Published Topics

audioLevel(std_msgs/UInt8): Integer with the value of the peak received from the sink.

Parameters

~meter_rate(int, default: 5): Rate of audio checks.

~display_scale(int, default: 0): For scaling purposes, not used.

LICENSE

The license of the packages is custom LASR-UC3M (Licencia Académica Social Robotics Lab - UC3M), an open, non-commercial license which enables you to download, modify and distribute the code as long as you distribute the sources.

ACKNOWLEDGEMENTS

RoboticsLab UC3M