range_and_bearing_medium_sensor.h
Go to the documentation of this file.
1 
7 #ifndef RANGE_AND_BEARING_MEDIUM_SENSOR_H
8 #define RANGE_AND_BEARING_MEDIUM_SENSOR_H
9 
10 #include <string>
11 #include <map>
12 
13 namespace argos {
14  class CRangeAndBearingMediumSensor;
15  class CRABEquippedEntity;
16  class CControllableEntity;
17  class CRABMedium;
18 }
19 
20 #include <argos3/core/simulator/sensor.h>
21 #include <argos3/core/utility/math/rng.h>
22 #include <argos3/core/simulator/space/space.h>
23 #include <argos3/plugins/robots/generic/control_interface/ci_range_and_bearing_sensor.h>
24 
25 namespace argos {
26 
29 
30  public:
31 
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 
43  virtual void Destroy();
44 
45  virtual void Enable();
46 
47  virtual void Disable();
48 
53  inline bool IsShowRays() {
54  return m_bShowRays;
55  }
56 
61  inline void SetShowRays(bool b_show_rays) {
62  m_bShowRays = b_show_rays;
63  }
64 
65  private:
66 
67  CRABEquippedEntity* m_pcRangeAndBearingEquippedEntity;
68  CControllableEntity* m_pcControllableEntity;
69  CRABMedium* m_pcRangeAndBearingMedium;
70  Real m_fDistanceNoiseStdDev;
71  Real m_fPacketDropProb;
72  CRandom::CRNG* m_pcRNG;
73  CSpace& m_cSpace;
74  bool m_bShowRays;
75  };
76 }
77 
78 #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.
The basic interface for a simulated sensor.
Definition: sensor.h:24
The RNG.
Definition: rng.h:90
virtual void Init(TConfigurationNode &t_tree)
Initializes the sensor from the XML configuration tree.
virtual void Update()
Updates the state of the entity associated to this sensor, if the sensor is currently enabled.
virtual void Enable()
Enables updating of sensor information in the event loop.
virtual void Reset()
Resets the sensor to the state it had just after Init().
bool IsShowRays()
Returns true if the rays must be shown in the GUI.
virtual void Disable()
Disables updating of sensor information in the event loop.
void SetShowRays(bool b_show_rays)
Sets whether or not the rays must be shown in the GUI.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this sensor.