eyebot_entity.h
Go to the documentation of this file.
1 
7 #ifndef EYEBOT_ENTITY_H
8 #define EYEBOT_ENTITY_H
9 
10 namespace argos {
11  class CControllableEntity;
12  class CEmbodiedEntity;
13  class CEyeBotEntity;
14  class CLEDEquippedEntity;
15  class CLightSensorEquippedEntity;
16  class CPerspectiveCameraEquippedEntity;
17  class CProximitySensorEquippedEntity;
18  class CQuadRotorEntity;
19  class CRABEquippedEntity;
20  class CBatteryEquippedEntity;
21 }
22 
23 #include <argos3/core/simulator/entity/composable_entity.h>
24 
25 namespace argos {
26 
28 
29  public:
30 
31  ENABLE_VTABLE();
32 
33  public:
34 
35  CEyeBotEntity();
36 
37  CEyeBotEntity(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 = 3.0f,
42  size_t un_rab_data_size = 10,
43  const std::string& str_bat_model = "",
44  const CRadians& c_perspcam_aperture = ToRadians(CDegrees(30.0f)),
45  Real f_perspcam_focal_length = 0.035,
46  Real f_perspcam_range = 2.0);
47 
48  virtual void Init(TConfigurationNode& t_tree);
49  virtual void Reset();
50 
51  virtual void UpdateComponents();
52 
54  return *m_pcControllableEntity;
55  }
56 
58  return *m_pcEmbodiedEntity;
59  }
60 
62  return *m_pcLEDEquippedEntity;
63  }
64 
66  return *m_pcLightSensorEquippedEntity;
67  }
68 
70  return *m_pcProximitySensorEquippedEntity;
71  }
72 
74  return *m_pcQuadRotorEntity;
75  }
76 
78  return *m_pcRABEquippedEntity;
79  }
80 
82  return *m_pcBatteryEquippedEntity;
83  }
84 
85  virtual std::string GetTypeDescription() const {
86  return "eye-bot";
87  }
88 
89  private:
90 
91  CControllableEntity* m_pcControllableEntity;
92  CEmbodiedEntity* m_pcEmbodiedEntity;
93  CLEDEquippedEntity* m_pcLEDEquippedEntity;
94  CLightSensorEquippedEntity* m_pcLightSensorEquippedEntity;
95  CPerspectiveCameraEquippedEntity* m_pcPerspectiveCameraEquippedEntity;
96  CProximitySensorEquippedEntity* m_pcProximitySensorEquippedEntity;
97  CQuadRotorEntity* m_pcQuadRotorEntity;
98  CRABEquippedEntity* m_pcRABEquippedEntity;
99  CBatteryEquippedEntity* m_pcBatteryEquippedEntity;
100  };
101 
102 }
103 
104 #endif
An entity that contains a pointer to the user-defined controller.
A 3D vector class.
Definition: vector3.h:29
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
CRABEquippedEntity & GetRABEquippedEntity()
Definition: eyebot_entity.h:77
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
This entity is a link to a body in the physics engine.
CEmbodiedEntity & GetEmbodiedEntity()
Definition: eyebot_entity.h:57
It defines the basic type CDegrees, used to store an angle value in degrees.
Definition: angles.h:288
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
virtual void UpdateComponents()
Calls the Update() method on all the components.
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
Definition: eyebot_entity.h:81
A container of CLEDEntity.
Basic class for an entity that contains other entities.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
Definition: angles.h:498
CControllableEntity & GetControllableEntity()
Definition: eyebot_entity.h:53
CProximitySensorEquippedEntity & GetProximitySensorEquippedEntity()
Definition: eyebot_entity.h:69
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
CLEDEquippedEntity & GetLEDEquippedEntity()
Definition: eyebot_entity.h:61
virtual std::string GetTypeDescription() const
Returns a string label for this class.
Definition: eyebot_entity.h:85
CLightSensorEquippedEntity & GetLightSensorEquippedEntity()
Definition: eyebot_entity.h:65
CQuadRotorEntity & GetQuadRotorEntity()
Definition: eyebot_entity.h:73