Thermomether Sensor

Thermomether sensor to detect nearby objects.

This sensor emulates a Thermometer, measuring the temperature with respect to the distance to heat sources. It defines a default temperature throughout the scenario, which is affected by local fire sources. The temperature rises exponentially when the distance between the sensor and the heat source decreases.

The default temperature is specified as a parameter Temperature of the Scene_Script_Holder Empty object in the simulation file. It is expressed in degrees Celsius.

Configuration parameters for thermomether sensor

No configurable parameter.

Data fields

This sensor exports these datafields at each simulation step:

  • temperature (float, initial value: 0.0)

    temperature in Celsius

Interface support:

Services for Thermomether Sensor

  • get_local_data() (blocking)

    Returns the current data stored in the sensor.

    • Return value

      a dictionary of the current sensor’s data

Examples

The following example shows how to use this component in a Builder script:

from morse.builder import *

robot = ATRV()

# creates a new instance of the sensor
thermometer = Thermometer()

# place your component at the correct location
thermometer.translate(<x>, <y>, <z>)
thermometer.rotate(<rx>, <ry>, <rz>)

robot.append(thermometer)

# define one or several communication interface, like 'socket'
thermometer.add_interface(<interface>)

env = Environment('empty')

Other sources of examples

(This page has been auto-generated from MORSE module morse.sensors.thermometer.)

Table Of Contents

Previous topic

Stereo Camera Unit

Next topic

Video camera

This Page