Home | Tutorials | Wiki | Issues
Ask Your Question

Simulated audio sources, microphone sensors and actor behaviour

asked 2016-02-16 09:29:52 -0500

Gradil gravatar image


I have a simulated world with my robot (with several sensors and actuators all of them connected to ROS and passing data), and an actor. (Having Ros Indigo and gazebo 4)

Having this I want to make two diferent questions that might be very relevant for some, as I couldn't find any information that satisfied my curiosity.

1st - Is there any way of adding audio sources in the world and the microphone sensors to detect it?

2nd - Is there anyway of having the actor doing more unpredictable trajectories / react to the world, instead of fixed trajectories define previewsly?

edit retag flag offensive close merge delete


Not sure if you have to use Gazebo, but take a look at Stage (It also has ROS integration).. There may be an audio sensor in there... http://pooyak.com/work/pubs/pooya-karimian-msc-thesis.pdf (With a quick scan I can't find it in the source though...)

SL Remy gravatar imageSL Remy ( 2016-02-16 09:46:49 -0500 )edit

thanks for the feedback, i'll check that link, and yes Gazebo is my restriction :)

Gradil gravatar imageGradil ( 2016-02-16 12:01:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-16 10:08:20 -0500

nkoenig gravatar image
  1. You can add audio sources and sinks in Gazebo using the <audio_source> and <audio_sink> SDF tags. Example world

  2. You can write a plugin for an actor. Your plugin can then control the actor in any manner you desire.

edit flag offensive delete link more


1.does the <audio_sink> work like a sensor, ie generates a topic with data wich I can access through Ros? 2. can I use the default gazebo actor, or what you are saying is that I should make an actor with a skeleton whose joint are actuated by a Ros Control package like my robot? Thank you for the answer

Gradil gravatar imageGradil ( 2016-02-16 11:00:10 -0500 )edit

Unfortunately it does not. The two tags are minimal front-end to OpenAL, which will generate audio in simulation and output the audio to speakers. For the actor, what I've done in the past is use a walking animation, and then use a plugin to actually move the actor around the scene.

nkoenig gravatar imagenkoenig ( 2016-02-16 11:13:08 -0500 )edit

thanks so much for the feedback, that's really unfortunate but I will see what I can do with this information, and what kind of interaction I can do to simulate what I need (simply generate a sound and check if it comes from the left or right side, i can use contact and two actuators to simulate that interaction manually maybe)

Gradil gravatar imageGradil ( 2016-02-16 11:22:51 -0500 )edit

Wow this is cool. Recently, I'm doing research about acoustic wave propagating in space and receive by robot. The robot got signal processing module to processing the audio it receive. OpenAL is exactly what I need for simulation. I'll definitely try it soon. But I see that OpenAL is fairly basic in gazebo integration and may not be further supported, I felt pity for that. All suggestion are welcomed. Thanks a lot!

Edward Chen gravatar imageEdward Chen ( 2018-05-16 02:35:32 -0500 )edit

Some questions come up my mind: 1. does openAL support audio_sink to another application, or other ways for me to harvest the received acoustic signal for robot signal processing stack to work on? 2. does openAL handle acoustic reflection from multi-object in the gazebo scene? or it mainly focuses on direct propagation simulation of acoustic wave? 3. can I have multiple sound source and sound sink in gazebo world? can it be moved during simulation?

Edward Chen gravatar imageEdward Chen ( 2018-05-16 02:40:20 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-02-16 09:29:52 -0500

Seen: 13,875 times

Last updated: Feb 16 '16