1#ifndef SENSOR_BACKEND_BASE_H
2#define SENSOR_BACKEND_BASE_H
12namespace sensors::backends
95 const std::string backend_type_;
101 real_t sampling_period_{0.0};
114backend_type_(backend_type)
Base class for modelling sensors with different implementations.
Definition sensor_backend_base.h:22
void set_sampling_period(real_t period)
Set the sampling period of the backend.
Definition sensor_backend_base.h:39
virtual ~SensorBackendBase()=default
Destructor.
uint_t n_read_values() const noexcept
Definition sensor_backend_base.h:75
virtual std::vector< real_t > read_values()=0
Read the sensor value.
SensorBackendBase(const std::string &backend_type)
Constructor.
Definition sensor_backend_base.h:112
std::string backend_type_str() const noexcept
Definition sensor_backend_base.h:81
virtual void load_from_json(const std::string &filename)=0
Load robot and simulation parameters from a JSON file.
real_t sampling_period() const noexcept
Returns the sampling period of the sensor.
Definition sensor_backend_base.h:33
virtual std::string sensor_units() const
Definition sensor_backend_base.h:51
const std::string INVALID_STR
Invalid string.
Definition bitrl_consts.h:26
Definition bitrl_consts.h:14
double real_t
real_t
Definition bitrl_types.h:23
std::size_t uint_t
uint_t
Definition bitrl_types.h:43