ARGoS  3
A parallel, multi-engine simulator for swarm robotics
ci_footbot_encoder_sensor.h
Go to the documentation of this file.
1 
16 #ifndef CCI_FOOTBOT_ENCODER_SENSOR_H
17 #define CCI_FOOTBOT_ENCODER_SENSOR_H
18 
19 /* To avoid dependency problems when including */
20 namespace argos {
21  class CCI_FootBotEncoderSensor;
22 }
23 
24 #include <argos3/core/control_interface/ci_sensor.h>
25 
26 namespace argos {
27 
29 
30  public:
31 
39  struct SReading {
43 
47  WheelAxisLength(0.0f) {}
48 
49  SReading(Real f_covered_distance_left_wheel,
50  Real f_covered_distance_right_wheel,
51  Real f_wheel_axis_length) :
52  CoveredDistanceLeftWheel(f_covered_distance_left_wheel),
53  CoveredDistanceRightWheel(f_covered_distance_right_wheel),
54  WheelAxisLength(f_wheel_axis_length) {
55  }
56 
57  };
58 
63 
68  const SReading& GetReading() const;
69 
70 #ifdef ARGOS_WITH_LUA
71  virtual void CreateLuaState(lua_State* pt_lua_state);
72 
73  virtual void ReadingsToLuaState(lua_State* pt_lua_state);
74 #endif
75 
76  protected:
77 
79  };
80 
81 }
82 
83 #endif
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CCI_FootBotEncoderSensor::SReading
The DTO of the encoder It returns the distance covered by the wheels in the last timestep In addition...
Definition: ci_footbot_encoder_sensor.h:39
argos::CCI_FootBotEncoderSensor::SReading::CoveredDistanceLeftWheel
Real CoveredDistanceLeftWheel
Definition: ci_footbot_encoder_sensor.h:40
argos::CCI_Sensor
The basic interface for all sensors.
Definition: ci_sensor.h:34
argos::CCI_FootBotEncoderSensor::m_sReading
SReading m_sReading
Definition: ci_footbot_encoder_sensor.h:78
argos::CCI_FootBotEncoderSensor::SReading::SReading
SReading(Real f_covered_distance_left_wheel, Real f_covered_distance_right_wheel, Real f_wheel_axis_length)
Definition: ci_footbot_encoder_sensor.h:49
argos::CCI_FootBotEncoderSensor::SReading::CoveredDistanceRightWheel
Real CoveredDistanceRightWheel
Definition: ci_footbot_encoder_sensor.h:41
argos::CCI_FootBotEncoderSensor::~CCI_FootBotEncoderSensor
virtual ~CCI_FootBotEncoderSensor()
Destructor.
Definition: ci_footbot_encoder_sensor.h:62
argos::CCI_FootBotEncoderSensor
Definition: ci_footbot_encoder_sensor.h:28
argos::CCI_FootBotEncoderSensor::SReading::WheelAxisLength
Real WheelAxisLength
Definition: ci_footbot_encoder_sensor.h:42
argos::CCI_FootBotEncoderSensor::GetReading
const SReading & GetReading() const
Returns the reading of the encoder sensor Returns the reading of the encoder sensor.
Definition: ci_footbot_encoder_sensor.cpp:18
Real
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
argos::CCI_FootBotEncoderSensor::SReading::SReading
SReading()
Definition: ci_footbot_encoder_sensor.h:44