ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
00001 00007 #ifndef LIGHT_DEFAULT_SENSOR_H 00008 #define LIGHT_DEFAULT_SENSOR_H 00009 00010 #include <string> 00011 #include <map> 00012 00013 namespace argos { 00014 class CLightDefaultSensor; 00015 class CLightSensorEquippedEntity; 00016 } 00017 00018 #include <argos3/plugins/robots/generic/control_interface/ci_light_sensor.h> 00019 #include <argos3/core/utility/math/range.h> 00020 #include <argos3/core/utility/math/rng.h> 00021 #include <argos3/core/simulator/space/space.h> 00022 #include <argos3/core/simulator/sensor.h> 00023 00024 namespace argos { 00025 00026 class CLightDefaultSensor : public CSimulatedSensor, 00027 public CCI_LightSensor { 00028 00029 public: 00030 00031 CLightDefaultSensor(); 00032 00033 virtual ~CLightDefaultSensor() {} 00034 00035 virtual void SetRobot(CComposableEntity& c_entity); 00036 00037 virtual void Init(TConfigurationNode& t_tree); 00038 00039 virtual void Update(); 00040 00041 virtual void Reset(); 00042 00052 virtual Real CalculateReading(Real f_distance, Real f_intensity); 00053 00054 protected: 00055 00057 CEmbodiedEntity* m_pcEmbodiedEntity; 00058 00060 CLightSensorEquippedEntity* m_pcLightEntity; 00061 00063 CControllableEntity* m_pcControllableEntity; 00064 00066 bool m_bShowRays; 00067 00069 CRandom::CRNG* m_pcRNG; 00070 00072 bool m_bAddNoise; 00073 00075 CRange<Real> m_cNoiseRange; 00076 00078 CSpace& m_cSpace; 00079 }; 00080 00081 } 00082 00083 #endif