|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
Class for modelling ultrasonic sensors. More...
#include <ultrasonic_sensor.h>


Public Member Functions | |
| UltrasonicSensor (std::shared_ptr< bitrl::sensors::backends::RangeSensorBackendBase > backend, const std::string name=bitrl::consts::INVALID_STR) | |
| Constructor. | |
| virtual void | init () |
| Initialize the sensor. Set the is is_enabled_ flag to true. and performs any other initializations required by the sensor. | |
| virtual const std::vector< real_t > & | read_values () |
| Reads the sensor values and updates the values held internally. | |
| virtual std::string | backend_type_str () const |
| virtual std::string | sensor_units () const |
Public Member Functions inherited from bitrl::sensors::SensorBase | |
| virtual | ~SensorBase ()=default |
| Destructor. | |
| bool | is_enabled () const noexcept |
| Returns true if the sensor is enabled. | |
| void | enable () noexcept |
| Set the is_enabled_ flag to true. | |
| void | disable () noexcept |
| Disable the sensor. | |
| const std::vector< real_t > & | last_read_values () const noexcept |
| std::string | sensor_name () const noexcept |
| void | set_sensor_name (const std::string &sensor_name) noexcept |
| Set the sensor name. | |
| std::string | sensor_type () const noexcept |
Static Public Attributes | |
| static const std::string | SENSOR_TYPE = "UltrasonicSensor" |
| The type of the sensor. | |
Additional Inherited Members | |
Protected Member Functions inherited from bitrl::sensors::SensorBase | |
| SensorBase (const std::string &sensor_type, const std::string &sensor_name=bitrl::consts::INVALID_STR) | |
Protected Attributes inherited from bitrl::sensors::SensorBase | |
| std::vector< real_t > | values_ |
| The values last read by the sensor. | |
Class for modelling ultrasonic sensors.
|
inlineexplicit |
Constructor.
| backend |
|
inlinevirtual |
Implements bitrl::sensors::SensorBase.
|
virtual |
Initialize the sensor. Set the is is_enabled_ flag to true. and performs any other initializations required by the sensor.
Implements bitrl::sensors::SensorBase.
|
virtual |
Reads the sensor values and updates the values held internally.
Implements bitrl::sensors::SensorBase.
|
inlinevirtual |
Implements bitrl::sensors::SensorBase.
|
static |
The type of the sensor.