This program shows how MiRo can localise sounds using the two microphones in its ears.
The algorithm is an adapted version of the Jeffress model, with the added dynamic noise thresholding.
The code is packaged as a ROS 1 package, and requires ROS + MDK installed.
Clone the repo into ~/mdk/catkin/src and build with the following commands:
cd ~/mdk/catkin_ws/src
git clone https://github.com/MiRo-projects/miro_active_hearing
catkin build
source ~/.bashrcThe program runs as a single ROS node, with the main file being point_to_sound.py that can be run with rosrun:
rosrun miro_active_hearing point_to_sound.pyBy default, the node only shows visualisation for the audio signals.
To enable actuation on the real robot, comment out the lines 89 and 304 in the point_to_sound.py