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 
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
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
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CRABEquippedEntity & GetRABEquippedEntity()
Definition: spiri_entity.h:59
CQuadRotorEntity & GetQuadRotorEntity()
Definition: spiri_entity.h:55
CPerspectiveCameraEquippedEntity & GetPerspectiveCameraEquippedEntity()
Definition: spiri_entity.h:63
virtual std::string GetTypeDescription() const
Returns a string label for this class.
Definition: spiri_entity.h:71
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
Definition: spiri_entity.h:67
CEmbodiedEntity & GetEmbodiedEntity()
Definition: spiri_entity.h:51
CControllableEntity & GetControllableEntity()
Definition: spiri_entity.h:47