Microphone

HRIM defines a microphone as
A device that captures audio.

So, apart from the common requirements (ID, Status, Power, Specs and Simulation, detailed in HRIM component model section), all microphones will contain a topic referring to publishing an audio reading.

HRIM component model: Force&Torque sensor
URI XML MODEL ABSTRACTION CLASS
M/O
SHORT DESCRIPTION
/hros_sensor_microphone_<instance_id>/id generic/id.xml service M Ask for component identification.
/hros_sensor_microphone_<instance_id>/status generic/status.xml topic
(Pub)
M How the module is working.
/hros_sensor_microphone_<instance_id>/power generic/power.xml topic
(Pub)
M Describes the power supply type and give the information about the module power consumption.
/hros_sensor_microphone_<instance_id>/specs_comm generic/specs_comm.xml service M Ask for the communication capabilities the component offers.
/hros_sensor_microphone_<instance_id>/state_comm generic/state_comm.xml topic
(Pub)
M Published the resources that the component is using at the moment.
/hros_sensor_microphone_<instance_id>/module_3d generic/module_3d.xml service M Ask for the 3D model of the HRIM component.
/hros_sensor_microphone_<instance_id>/module_urdf generic/module_urdf.xml service M Ask for the information of the HRIM component's 3D model.
/hros_sensor_microphone_<instance_id>/specs sensor/microphone/topics/specs.xml service M Ask for device features.
/hros_sensor_microphone_<instance_id>/audio sensor/microphone/topics/audio.xml topic
(Pub)
M Audio reading.
Parameters
PARAMETER NAME DATA TYPE UNIT CLASS
M/O
SHORT DESCRIPTION
polar_pattern int enumeration O Current polar pattern.
Only applicable to microphones with multi-pattern capabilities.
- Omnidirectional=0
- Bidirectional=1
- Cardioid=2

Note: the {BASE} wildcard references the base topics all modules contain, defined in the HRIM component model page.

The XML notation would look like:

<?xml version="1.0"?>
<module name="microphone" type="sensor" description="defines the messages to interact with a microphone">

  <mandatory>

    {BASE}

    <topic name="specs" type="service" description="device features" fileName="SpecsMicrophone">
      <response>
        <property name="sensitivity" type="uint32" unit="decibel" description="typical sensitivity at 1Pa, 1KHz">
          <value></value>
        </property>
        <property name="min_frequency" type="uint32" unit="hertz" description="minimum frequency the microphone detects">
          <value></value>
        </property>
        <property name="max_frequency" type="uint32" unit="hertz" description="maximum frequency the microphone detects">
          <value></value>
        </property>
        <property name="impedance" type="uint32" unit="ohm" description="typical output impedance at 1Pa, 1KHz">
          <value></value>
        </property>
        <property name="signal_noise_ratio" type="float32" unit="A-weighted decibel" description="typical signal to noise ratio at 1Pa, 1KHz">
          <value></value>
        </property>
        <property name="polar_pattern" type="uint8" unit="enum" enum='{"OMNIDIRECTIONAL": 0, "BIDIRECTIONAL": 1, "CARDIOID": 2, "MULTIPATTERN": 3}' description="the 3-dimensional space surrounding the microphone where it's most sensitive to sound">
          <value></value>
        </property>
        <property name="min_operating_temp" type="int32" unit="celsius" description="minimum temperature at which the microphone is operational">
          <value></value>
        </property>
        <property name="max_operating_temp" type="int32" unit="celsius" description="maximum temperature at which the microphone is operational">
          <value></value>
        </property>
      </response>
    </topic>

    <topic name="audio" type="publish" description="single audio measurement" fileName="Audio">
      <property name="header" type="header" fileName="Header" package="std_msgs">
        <value></value>
      </property>
      <property name="frequency" type="uint16" unit="hertz" description="current frequency of the audio interface">
        <value></value>
      </property>
      <property name="data" type="int16[]" description="interlaced data of the audio buffer">
        <value></value>
      </property>
    </topic>

  </mandatory>

  <optional>

    <param name="polar_pattern" type="int" unit="enumeration" description="Current polar pattern, only applicable to microphones with multi-pattern capabilities. Omnidirectional=0, bidirectional=1, cardioid=2">
      <value></value>
    </param>

  </optional>
</module>