spiri_entity.h
Go to the documentation of this file.
1 
7 #ifndef SPIRI_ENTITY_H
8 #define SPIRI_ENTITY_H
9 
10 namespace argos {
11  class CControllableEntity;
12  class CEmbodiedEntity;
13  class CSpiriEntity;
14  class CQuadRotorEntity;
15  class CRABEquippedEntity;
16  class CPerspectiveCameraEquippedEntity;
17  class CBatteryEquippedEntity;
18 }
19 
20 #include <argos3/core/simulator/entity/composable_entity.h>
21 
22 namespace argos {
23 
25 
26  public:
27 
28  ENABLE_VTABLE();
29 
30  public:
31 
32  CSpiriEntity();
33 
34  CSpiriEntity(const std::string& str_id,
35  const std::string& str_controller_id,
36  const CVector3& c_position = CVector3(),
37  const CQuaternion& c_orientation = CQuaternion(),
38  Real f_rab_range = 3.0f,
39  size_t un_rab_data_size = 10,
40  const std::string& str_bat_model = "",
41  const CRadians& c_cam_aperture = ToRadians(CDegrees(30.0f)),
42  Real f_cam_range = 10.0f);
43 
44  virtual void Init(TConfigurationNode& t_tree);
45  virtual void Reset();
46 
48  return *m_pcControllableEntity;
49  }
50 
52  return *m_pcEmbodiedEntity;
53  }
54 
56  return *m_pcQuadRotorEntity;
57  }
58 
60  return *m_pcRABEquippedEntity;
61  }
62 
64  return *m_pcPerspectiveCameraEquippedEntity;
65  }
66 
68  return *m_pcBatteryEquippedEntity;
69  }
70 
71  virtual std::string GetTypeDescription() const {
72  return "spiri";
73  }
74 
75  private:
76 
77  CControllableEntity* m_pcControllableEntity;
78  CEmbodiedEntity* m_pcEmbodiedEntity;
79  CQuadRotorEntity* m_pcQuadRotorEntity;
80  CRABEquippedEntity* m_pcRABEquippedEntity;
81  CPerspectiveCameraEquippedEntity* m_pcPerspectiveCameraEquippedEntity;
82  CBatteryEquippedEntity* m_pcBatteryEquippedEntity;
83  };
84 
85 }
86 
87 #endif
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
An entity that contains a pointer to the user-defined controller.
A 3D vector class.
Definition: vector3.h:29
CRABEquippedEntity & GetRABEquippedEntity()
Definition: spiri_entity.h:59
CQuadRotorEntity & GetQuadRotorEntity()
Definition: spiri_entity.h:55
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
This entity is a link to a body in the physics engine.
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
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
Definition: spiri_entity.h:67
Basic class for an entity that contains other entities.
CEmbodiedEntity & GetEmbodiedEntity()
Definition: spiri_entity.h:51
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CControllableEntity & GetControllableEntity()
Definition: spiri_entity.h:47
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
Definition: angles.h:498
CPerspectiveCameraEquippedEntity & GetPerspectiveCameraEquippedEntity()
Definition: spiri_entity.h:63
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
virtual std::string GetTypeDescription() const
Returns a string label for this class.
Definition: spiri_entity.h:71