epuck_proximity_default_sensor.h
Go to the documentation of this file.
1 
7 #ifndef EPUCK_PROXIMITY_DEFAULT_SENSOR_H
8 #define EPUCK_PROXIMITY_DEFAULT_SENSOR_H
9 
10 #include <string>
11 #include <map>
12 
13 namespace argos {
14  class CEPuckProximityDefaultSensor;
15  class CProximitySensorEquippedEntity;
16 }
17 
18 #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_proximity_sensor.h>
19 #include <argos3/core/utility/math/range.h>
20 #include <argos3/core/utility/math/rng.h>
21 #include <argos3/core/simulator/space/space.h>
22 #include <argos3/core/simulator/sensor.h>
23 
24 namespace argos {
25 
28 
29  public:
30 
32 
34 
35  virtual void SetRobot(CComposableEntity& c_entity);
36 
37  virtual void Init(TConfigurationNode& t_tree);
38 
39  virtual void Update();
40 
41  virtual void Reset();
42 
48  virtual Real CalculateReading(Real f_distance);
49 
54  inline bool IsShowRays() {
55  return m_bShowRays;
56  }
57 
62  inline void SetShowRays(bool b_show_rays) {
63  m_bShowRays = b_show_rays;
64  }
65 
66  protected:
67 
70 
73 
76 
79 
82 
85 
88 
91  };
92 
93 }
94 
95 #endif
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Basic class for an entity that contains other entities.
An entity that contains a pointer to the user-defined controller.
This entity is a link to a body in the physics engine.
The basic interface for a simulated sensor.
Definition: sensor.h:24
The RNG.
Definition: rng.h:90
void SetShowRays(bool b_show_rays)
Sets whether or not the rays must be shown in the GUI.
virtual void Init(TConfigurationNode &t_tree)
Initializes the sensor from the XML configuration tree.
bool m_bAddNoise
Whether to add noise or not.
CControllableEntity * m_pcControllableEntity
Reference to controllable entity associated to this sensor.
CRandom::CRNG * m_pcRNG
Random number generator.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this sensor.
CEmbodiedEntity * m_pcEmbodiedEntity
Reference to embodied entity associated to this sensor.
virtual void Reset()
Resets the sensor to the state it had just after Init().
bool m_bShowRays
Flag to show rays in the simulator.
virtual void Update()
Updates the state of the entity associated to this sensor, if the sensor is currently enabled.
CProximitySensorEquippedEntity * m_pcProximityEntity
Reference to proximity sensor equipped entity associated to this sensor.
virtual Real CalculateReading(Real f_distance)
Calculates the proximity reading when the closest occluding object is located as the given distance.
bool IsShowRays()
Returns true if the rays must be shown in the GUI.