Sensor#

#include "navground/sim/state_estimations/sensor.h"
struct Sensor : public navground::sim::StateEstimation#

Base class for agents using a core::SensingState.

Subclassed by navground::sim::BoundarySensor, navground::sim::DiscsStateEstimation, navground::sim::LidarStateEstimation, navground::sim::LocalGridMapStateEstimation, navground::sim::OdometryStateEstimation, navground::sim::SensorCombination

Public Types

using Description = std::map<std::string, core::BufferDescription>#

A map where keys are field names

Public Functions

inline Sensor(const std::string &name = "")#

Constructs a new instance.

inline void prepare_state(core::SensingState &state) const#

Prepare a sensing state to have the correct buffers.

Parameters:

state – The state

virtual Description get_description() const = 0#

Gets the description of the buffers set by the sensors.

Returns:

The description.

inline void set_name(const std::string &value)#

Sets the sensor name.

Parameters:

value[in] The new value

inline const std::string &get_name() const#

Gets the sensor name.

Returns:

The name.

inline std::string get_field_name(const std::string &field) const#

Returns the field prefixed by the sensor name if set.

Parameters:

field[in] The field

Returns:

The name.