ci_footbot_motor_ground_sensor.h
Go to the documentation of this file.
1 
32 #ifndef CCI_FOOTBOT_MOTOR_GROUND_SENSOR_H
33 #define CCI_FOOTBOT_MOTOR_GROUND_SENSOR_H
34 
35 namespace argos {
36  class CCI_FootBotMotorGroundSensor;
37 }
38 
39 #include <argos3/core/control_interface/ci_sensor.h>
40 #include <argos3/core/utility/math/vector2.h>
41 #include <argos3/core/utility/math/range.h>
42 #include <vector>
43 
44 namespace argos {
45 
47 
48  public:
49 
50  struct SReading {
53 
55  Value(0.0f) {}
56 
57  SReading(Real f_value,
58  const CVector2& c_offset) :
59  Value(f_value),
60  Offset(c_offset) {}
61  };
62 
63  typedef std::vector<SReading> TReadings;
64 
65  public:
66 
68 
70 
71  const TReadings& GetReadings() const;
72 
73 #ifdef ARGOS_WITH_LUA
74  virtual void CreateLuaState(lua_State* pt_lua_state);
75 
76  virtual void ReadingsToLuaState(lua_State* pt_lua_state);
77 #endif
78 
79  protected:
80 
81  TReadings m_tReadings;
82 
83  };
84 
85  std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotMotorGroundSensor::SReading& s_reading);
86  std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotMotorGroundSensor::TReadings& t_readings);
87 
88 }
89 
90 #endif
std::ostream & operator<<(std::ostream &c_os, const CByteArray &c_byte_array)
Definition: byte_array.cpp:530
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
A 2D vector class.
Definition: vector2.h:25
The basic interface for all sensors.
Definition: ci_sensor.h:34
SReading(Real f_value, const CVector2 &c_offset)
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12