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 
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
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.
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
Definition: angles.h:498
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.
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
It defines the basic type CDegrees, used to store an angle value in degrees.
Definition: angles.h:288
A 3D vector class.
Definition: vector3.h:31
CEmbodiedEntity & GetEmbodiedEntity()
Definition: eyebot_entity.h:57
CLightSensorEquippedEntity & GetLightSensorEquippedEntity()
Definition: eyebot_entity.h:65
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.
CControllableEntity & GetControllableEntity()
Definition: eyebot_entity.h:53
CRABEquippedEntity & GetRABEquippedEntity()
Definition: eyebot_entity.h:77
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
Definition: eyebot_entity.h:81
virtual std::string GetTypeDescription() const
Returns a string label for this class.
Definition: eyebot_entity.h:85
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CQuadRotorEntity & GetQuadRotorEntity()
Definition: eyebot_entity.h:73
CLEDEquippedEntity & GetLEDEquippedEntity()
Definition: eyebot_entity.h:61
CProximitySensorEquippedEntity & GetProximitySensorEquippedEntity()
Definition: eyebot_entity.h:69
A container of CLEDEntity.