epuck_entity.h
Go to the documentation of this file.
1 
7 #ifndef EPUCK_ENTITY_H
8 #define EPUCK_ENTITY_H
9 
10 namespace argos {
11  class CControllableEntity;
12  class CEmbodiedEntity;
13  class CEPuckEntity;
14  class CGroundSensorEquippedEntity;
15  class CLEDEquippedEntity;
16  class CLightSensorEquippedEntity;
17  class CProximitySensorEquippedEntity;
18  class CRABEquippedEntity;
19  class CBatteryEquippedEntity;
20 }
21 
22 #include <argos3/core/simulator/entity/composable_entity.h>
23 #include <argos3/plugins/simulator/entities/wheeled_entity.h>
24 
25 namespace argos {
26 
28 
29  public:
30 
32 
33  public:
34 
35  CEPuckEntity();
36 
37  CEPuckEntity(const std::string& str_id,
38  const std::string& str_controller_id,
39  const CVector3& c_position = CVector3(),
40  const CQuaternion& c_orientation = CQuaternion(),
41  Real f_rab_range = 0.8f,
42  size_t un_rab_data_size = 2,
43  const std::string& str_bat_model = "");
44 
45  virtual void Init(TConfigurationNode& t_tree);
46  virtual void Reset();
47  virtual void Destroy();
48 
49  virtual void UpdateComponents();
50 
52  return *m_pcControllableEntity;
53  }
54 
56  return *m_pcEmbodiedEntity;
57  }
58 
60  return *m_pcGroundSensorEquippedEntity;
61  }
62 
64  return *m_pcLEDEquippedEntity;
65  }
66 
68  return *m_pcLightSensorEquippedEntity;
69  }
70 
72  return *m_pcProximitySensorEquippedEntity;
73  }
74 
76  return *m_pcRABEquippedEntity;
77  }
78 
80  return *m_pcWheeledEntity;
81  }
82 
84  return *m_pcBatteryEquippedEntity;
85  }
86 
87  virtual std::string GetTypeDescription() const {
88  return "e-puck";
89  }
90 
91  private:
92 
93  void SetLEDPosition();
94 
95  private:
96 
97  CControllableEntity* m_pcControllableEntity;
98  CEmbodiedEntity* m_pcEmbodiedEntity;
99  CGroundSensorEquippedEntity* m_pcGroundSensorEquippedEntity;
100  CLEDEquippedEntity* m_pcLEDEquippedEntity;
101  CLightSensorEquippedEntity* m_pcLightSensorEquippedEntity;
102  CProximitySensorEquippedEntity* m_pcProximitySensorEquippedEntity;
103  CRABEquippedEntity* m_pcRABEquippedEntity;
104  CWheeledEntity* m_pcWheeledEntity;
105  CBatteryEquippedEntity* m_pcBatteryEquippedEntity;
106  };
107 
108 }
109 
110 #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.
A 3D vector class.
Definition: vector3.h:31
CProximitySensorEquippedEntity & GetProximitySensorEquippedEntity()
Definition: epuck_entity.h:71
CRABEquippedEntity & GetRABEquippedEntity()
Definition: epuck_entity.h:75
CWheeledEntity & GetWheeledEntity()
Definition: epuck_entity.h:79
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CLEDEquippedEntity & GetLEDEquippedEntity()
Definition: epuck_entity.h:63
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
Definition: epuck_entity.h:83
CGroundSensorEquippedEntity & GetGroundSensorEquippedEntity()
Definition: epuck_entity.h:59
CControllableEntity & GetControllableEntity()
Definition: epuck_entity.h:51
virtual std::string GetTypeDescription() const
Returns a string label for this class.
Definition: epuck_entity.h:87
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
virtual void UpdateComponents()
Calls the Update() method on all the components.
virtual void Destroy()
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor.
CEmbodiedEntity & GetEmbodiedEntity()
Definition: epuck_entity.h:55
CLightSensorEquippedEntity & GetLightSensorEquippedEntity()
Definition: epuck_entity.h:67
A container of CLEDEntity.