facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.56k stars 416 forks source link

Multiple Audio Sensors Issue #2266

Open mahnoor-fatima-saad opened 10 months ago

mahnoor-fatima-saad commented 10 months ago

Hi

I'm trying to add multiple audio sensors to my agent.

However, once I do create multiple audio sensors, each with a different uuid, I get the following error from simulator.py when I try to get observations via the sensors:

/habitat_sim/simulator.py", line 765, in _get_audio_observation audio_sensor = self._agent._sensors["audio_sensor"] KeyError: 'audio_sensor'

According to my understanding, this is because the get_audio_observations() functions looks specifically for an audio sensor called "audio_sensor"? Could you please tell me if this is correct or if there is a workaround for this?

aclegg3 commented 6 months ago

Hey @mahnoor-fatima-saad,

Correct, it looks like the simulator.py _get_audio_observation function has a hardcoded uuid "audio_sensor" .

Easiest fix would be to modify this function to take uuid as input. It is only called internally from functions which have access to the spec in order to pass this. Should be an easy fix. Feel free to submit a PR if you decide to tackle this.