nicoros - AudioPlayer¶
The AudioPlayer class allows to load and play audio files.
To start the interface run:
rosrun nicoros AudioPlayer.py
Exposed topics¶
The following ROS topics are exposed by the class - where $PREFIX stands for the prefix of the topics/services (Default: nico/audioplayer):
ROS topic name |
Message type |
Short description |
|---|---|---|
$PREFIX/play |
nicomsg/sf |
|
$PREFIX/pause |
nicomsg/s |
Pauses the playback of an audio segment. Parameters: - id: id of the audio assigned by the player |
$PREFIX/resume |
nicomsg/s |
Resumes the playback of an audio segment. Parameters: - id: id of the audio assigned by the player |
$PREFIX/adjust_pitch |
nicomsg/sf |
|
$PREFIX/adjust_speed |
nicomsg/sf |
|
Exposed services¶
The following ROS services are exposed by the class - where $PREFIX stands for the prefix of the topics/services (Default: /nico/audioplayer):
ROS topic name |
Message type |
Short description |
|---|---|---|
$PREFIX/load_file |
nicomsg/LoadAudio |
Loads (part) of the given audiofile
Returns id assigned by the player |
$PREFIX/get_position |
nicomsg/GetValue |
|
$PREFIX/get_duration |
nicomsg/GetValue |
|
$PREFIX/get_filename |
nicomsg/GetFilename |
|
$PREFIX/get_audio_ids |
nicomsg/GetAudioIDs |
Returns ids of all loaded audio segments |