Hygrometer

HRIM defines a hygrometer as
A device that measures ambient relative humidity.

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

HRIM component model: Hygrometer
URI XML MODEL ABSTRACTION CLASS
M/O
SHORT DESCRIPTION
/hrim_sensor_hygrometer_<instance_id>/id generic/id.xml service M Ask for component identification.
/hrim_sensor_hygrometer_<instance_id>/status generic/status.xml topic
(Pub)
M How the module is working.
/hrim_sensor_hygrometer_<instance_id>/power generic/power.xml topic
(Pub)
M Describes the power supply type and give the information about the module power consumption.
/hrim_sensor_hygrometer_<instance_id>/specs_comm generic/specs_comm.xml service M Ask for the communication capabilities the component offers.
/hrim_sensor_hygrometer_<instance_id>/state_comm generic/state_comm.xml topic
(Pub)
M Published the resources that the component is using at the moment.
/hrim_sensor_hygrometer_<instance_id>/module_3d generic/module_3d.xml service M Ask for the 3D model of the HRIM component.
/hrim_sensor_hygrometer_<instance_id>/module_urdf generic/module_urdf.xml service M Ask for the information of the HRIM component's 3D model.
/hrim_sensor_hygrometer_<instance_id>/specs sensor/hygrometer/topics/specs.xml service M Ask for device features.
/hrim_sensor_hygrometer_<instance_id>/reading sensor/hygrometer/topics/relativeHumidity.xml topic
(Pub)
M Relative humidity reading.
/hrim_sensor_hygrometer_<instance_id>/temperature sensor/hygrometer/topics/temperature.xml topic
(Pub)
O Ambient temperature, also informs if there is a temperature error. The integration of a temperature sensor is needed.

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="hygrometer" type="sensor" description="defines the messages to interact with a relative humidity sensor">

  <mandatory>

    {BASE}

    <topic name="specs" type="service" description="device features" fileName="SpecsHygrometer">
      <response>
        <property name="resolution" type="float32" unit="rh" description="minimum change the hygrometer detects, example 0.01">
          <value></value>
        </property>
        <property name="max_calibrated_rh" type="float32" unit="rh" description="Maximum relative humidity where the detection accuracy is at it's best">
          <value></value>
        </property>
        <property name="min_calibrated_rh" type="float32" unit="rh" description="Minimum relative humidity where the detection accuracy is at it's best">
          <value></value>
        </property>
        <property name="max_calibrated_temp" type="float32" unit="celsius" description="Maximum temperature where the detection accuracy is at it's best">
          <value></value>
        </property>
        <property name="min_calibrated_temp" type="float32" unit="celsius" description="Minimum temperature where the detection accuracy is at it's best">
          <value></value>
        </property>
        <property name="accuracy_calibrated" type="float32" unit="+- rh" description="average error margin while inside the calibrated ranges">
          <value></value>
        </property>
        <property name="accuracy_other" type="float32" unit="+- rh" description="average error margin while outside the calibrated ranges">
          <value></value>
        </property>
        <property name="max_rh" type="float32" unit="rh" description="maximum operating relative humidity">
          <value></value>
        </property>
        <property name="min_rh" type="float32" unit="rh" description="minimum operating relative humidity">
          <value></value>
        </property>
        <property name="max_temp" type="float32" unit="celsius" description="maximum operating temperature">
          <value></value>
        </property>
        <property name="min_temp" type="float32" unit="celsius" description="minimum operating temperature">
          <value></value>
        </property>
        <property name="max_measure_time" type="float32" unit="second" description="maximum amount of time needed for a measurement">
          <value></value>
        </property>
        <property name="min_measure_time" type="float32" unit="second" description="minimum amount of time needed for a measurement">
          <value></value>
        </property>
        <property name="device_type" type="uint8" unit="enum" enum='{"CAPACITIVE": 0, "RESISTIVE": 1, "THERMAL": 2, "GRAVIMETRIC": 3}' description="the technique the hygrometer detects relative humidity">
          <value></value>
        </property>
      </response>
    </topic>

    <topic name="relative_humidity" type="publish" description="single reading defining the ratio of partial pressure of water vapor to the saturated vapor pressire at a temperature" fileName="RelativeHumidity">
      <property name="header" type="header" fileName="Header" package="std_msgs">
        <value></value>
      </property>
      <property name="relative_humidity" type="float64" unit="rh" description="from 0.0 to 1.0, 0 being no partial pressure of water vapor and 1 being partial pressure of saturation">
        <value></value>
      </property>
      <property name="variance" type="float64" description="0 interpreted as variance unknown">
        <value></value>
      </property>
    </topic>
  </mandatory>
  <optional>

    <topic name="temperature" type="publish" description="ambient temperature, also informs if there is temperature error" fileName="Temperature">
      <property name="header" type="header" fileName="Header" package="std_msgs">
        <value></value>
      </property>
      <property name="temperature" type="float64" unit="celsius" description="current temperature">
        <value></value>
      </property>
      <property name="temperature_error" type="boolean" description="whether current temperature is outside of the component's allowed range">
        <value></value>
      </property>
    </topic>

  </optional>
</module>