ARGoS  3
A parallel, multi-engine simulator for swarm robotics
plugins/robots/foot-bot/control_interface/ci_footbot_proximity_sensor.h
Go to the documentation of this file.
00001 
00032 #ifndef CCI_FOOTBOT_PROXIMITY_SENSOR_H
00033 #define CCI_FOOTBOT_PROXIMITY_SENSOR_H
00034 
00035 namespace argos {
00036    class CCI_FootBotProximitySensor;
00037 }
00038 
00039 #include <argos3/core/control_interface/ci_sensor.h>
00040 #include <argos3/core/utility/math/angles.h>
00041 
00042 namespace argos {
00043 
00044    class CCI_FootBotProximitySensor : public CCI_Sensor {
00045 
00046    public:
00047 
00048       struct SReading {
00049          Real Value;
00050          CRadians Angle;
00051 
00052          SReading() :
00053             Value(0.0f) {}
00054 
00055          SReading(Real f_value,
00056                   const CRadians& c_angle) :
00057             Value(f_value),
00058             Angle(c_angle) {}
00059       };
00060 
00061       typedef std::vector<SReading> TReadings;
00062 
00063    public:
00064 
00068       CCI_FootBotProximitySensor();
00069 
00073       virtual ~CCI_FootBotProximitySensor() {}
00074 
00078       inline const TReadings& GetReadings() const {
00079          return m_tReadings;
00080       }
00081 
00082 #ifdef ARGOS_WITH_LUA
00083       virtual void CreateLuaState(lua_State* pt_lua_state);
00084 
00085       virtual void ReadingsToLuaState(lua_State* pt_lua_state);
00086 #endif
00087 
00088    protected:
00089 
00090       TReadings m_tReadings;
00091 
00092    };
00093 
00094    std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotProximitySensor::SReading& s_reading);
00095    std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotProximitySensor::TReadings& t_readings);
00096 
00097 }
00098 
00099 #endif