RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
rtabmap::EnvSensor Class Reference

Single environmental measurement (type, value, timestamp). More...

#include <EnvSensor.h>

Public Types

enum  Type {
  kUndefined = 0 , kWifiSignalStrength , kAmbientTemperature , kAmbientAirPressure ,
  kAmbientLight , kAmbientRelativeHumidity , kCustomSensor1 = 100 , kCustomSensor2 ,
  kCustomSensor3 , kCustomSensor4 , kCustomSensor5 , kCustomSensor6 ,
  kCustomSensor7 , kCustomSensor8 , kCustomSensor9
}
 Environmental sensor channel identifier. More...
 

Public Member Functions

 EnvSensor ()
 Default constructor: kUndefined type, zero value and stamp.
 
 EnvSensor (const Type &type, const double &value, const double &stamp=0)
 Constructs a reading with the given type, value, and optional stamp.
 
const Typetype () const
 
const double & value () const
 
const double & stamp () const
 

Detailed Description

Single environmental measurement (type, value, timestamp).

Built-in Type values cover common phone/robot sensors; kCustomSensor1 through kCustomSensor9 are reserved for application-specific channels. Units depend on the type (see Type).

Samples are stored per node in SensorData via EnvSensors (one entry per type). Persisted in the database with node records (DBDriver).

See also
SensorData::setEnvSensors()
SensorData::addEnvSensor()
SensorData::envSensors()

Definition at line 50 of file EnvSensor.h.

Member Enumeration Documentation

◆ Type

Environmental sensor channel identifier.

Built-in types use fixed units; custom types (≥ kCustomSensor1) have application-defined meaning and units.

Enumerator
kUndefined 

Uninitialized / unknown channel.

kWifiSignalStrength 

Wi‑Fi signal strength (dBm).

kAmbientTemperature 

Ambient temperature (°C).

kAmbientAirPressure 

Ambient air pressure (hPa).

kAmbientLight 

Ambient illuminance (lx).

kAmbientRelativeHumidity 

Relative humidity (%).

kCustomSensor1 

User-defined sensor slot 1.

kCustomSensor2 

User-defined sensor slot 2.

kCustomSensor3 

User-defined sensor slot 3.

kCustomSensor4 

User-defined sensor slot 4.

kCustomSensor5 

User-defined sensor slot 5.

kCustomSensor6 

User-defined sensor slot 6.

kCustomSensor7 

User-defined sensor slot 7.

kCustomSensor8 

User-defined sensor slot 8.

kCustomSensor9 

User-defined sensor slot 9.

Definition at line 59 of file EnvSensor.h.

Constructor & Destructor Documentation

◆ EnvSensor() [1/2]

rtabmap::EnvSensor::EnvSensor ( )
inline

Default constructor: kUndefined type, zero value and stamp.

Definition at line 80 of file EnvSensor.h.

◆ EnvSensor() [2/2]

rtabmap::EnvSensor::EnvSensor ( const Type type,
const double &  value,
const double &  stamp = 0 
)
inline

Constructs a reading with the given type, value, and optional stamp.

Parameters
typeSensor channel (Type).
valueMeasurement in the units for type.
stampTimestamp in seconds (0 if unknown).

Definition at line 92 of file EnvSensor.h.

◆ ~EnvSensor()

virtual rtabmap::EnvSensor::~EnvSensor ( )
inlinevirtual

Definition at line 98 of file EnvSensor.h.

Member Function Documentation

◆ type()

const Type & rtabmap::EnvSensor::type ( ) const
inline
Returns
Sensor channel.

Definition at line 101 of file EnvSensor.h.

◆ value()

const double & rtabmap::EnvSensor::value ( ) const
inline
Returns
Measurement value (units depend on type()).

Definition at line 103 of file EnvSensor.h.

◆ stamp()

const double & rtabmap::EnvSensor::stamp ( ) const
inline
Returns
Timestamp in seconds.

Definition at line 105 of file EnvSensor.h.


The documentation for this class was generated from the following file: