quadrotor_entity.h
Go to the documentation of this file.
1 
7 #ifndef QUADROTOR_ENTITY_H
8 #define QUADROTOR_ENTITY_H
9 
10 #include <argos3/core/simulator/entity/entity.h>
11 #include <argos3/core/utility/math/vector3.h>
12 
13 namespace argos {
14 
15  class CQuadRotorEntity : public CEntity {
16 
17  public:
18 
19  ENABLE_VTABLE();
20 
21  public:
22 
27  };
28 
32 
34  SPositionControlData(const CVector3& c_position,
35  const CRadians& c_yaw);
36  };
37 
41 
43  SSpeedControlData(const CVector3& c_velocity,
44  const CRadians& c_rot_speed);
45  };
46 
47  public:
48 
50 
52  const std::string& str_id);
53 
54  virtual ~CQuadRotorEntity() {}
55 
56  virtual void Reset();
57 
59  return m_eControlMethod;
60  }
61 
62  void SetControlMethod(EControlMethod e_control_method) {
63  m_eControlMethod = e_control_method;
64  }
65 
67  return m_sPositionControlData;
68  }
69 
71  m_sPositionControlData = s_data;
72  }
73 
75  return m_sSpeedControlData;
76  }
77 
78  void SetSpeedControlData(const SSpeedControlData& s_data) {
79  m_sSpeedControlData = s_data;
80  }
81 
82  virtual std::string GetTypeDescription() const {
83  return "quadrotor";
84  }
85 
86  private:
87 
88  EControlMethod m_eControlMethod;
89  SPositionControlData m_sPositionControlData;
90  SSpeedControlData m_sSpeedControlData;
91 
92  };
93 
94 }
95 
96 #endif
virtual std::string GetTypeDescription() const
Returns a string label for this class.
A 3D vector class.
Definition: vector3.h:29
void SetControlMethod(EControlMethod e_control_method)
The basic entity type.
Definition: entity.h:89
CQuadRotorEntity(CComposableEntity *pc_parent)
void SetPositionControlData(const SPositionControlData &s_data)
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
void SetSpeedControlData(const SSpeedControlData &s_data)
Basic class for an entity that contains other entities.
const SSpeedControlData & GetSpeedControlData() const
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
const SPositionControlData & GetPositionControlData() const
EControlMethod GetControlMethod() const
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12