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
The basic interface for all sensors.
Definition: ci_sensor.h:34
virtual ~CCI_FootBotEncoderSensor()
Destructor.
const SReading & GetReading() const
Returns the reading of the encoder sensor Returns the reading of the encoder sensor.
SReading(Real f_covered_distance_left_wheel, Real f_covered_distance_right_wheel, Real f_wheel_axis_length)
The DTO of the encoder It returns the distance covered by the wheels in the last timestep In addition...
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
float Real
Collects all ARGoS code.
Definition: datatypes.h:39