pointmass3d_eyebot_model.cpp
Go to the documentation of this file.
1 
8 #include <argos3/core/utility/logging/argos_log.h>
9 #include <argos3/core/utility/math/cylinder.h>
10 #include <argos3/core/simulator/simulator.h>
11 #include <argos3/core/simulator/space/space.h>
12 #include <argos3/plugins/simulator/physics_engines/pointmass3d/pointmass3d_engine.h>
13 
14 namespace argos {
15 
16  static const Real BODY_HEIGHT = 0.566f;
17  static const Real BODY_RADIUS = 0.25f;
18  static const Real BODY_MASS = 1.00f;
19  static const Real BODY_INERTIA = 0.01f;
20  static const CVector3 POS_K_P(20.0f, 20.0f, 20.0f);
21  static const CVector3 POS_K_D(10.0f, 10.0f, 10.0f);
22  static const Real YAW_K_P = 0.5f;
23  static const Real YAW_K_D = 0.1f;
24  static const CVector3 VEL_K_P(1.0f, 1.0f, 1.0f);
25  static const CVector3 VEL_K_D(0.0f, 0.0f, 0.0f);
26  static const Real ROT_K_P = 0.5f;
27  static const Real ROT_K_D = 0.1f;
28 
29  /****************************************/
30  /****************************************/
31 
33  CEyeBotEntity& c_eyebot) :
35  c_eyebot.GetEmbodiedEntity(),
36  c_eyebot.GetQuadRotorEntity(),
37  BODY_HEIGHT,
38  BODY_RADIUS,
39  BODY_MASS,
40  BODY_INERTIA,
41  POS_K_P,
42  POS_K_D,
43  YAW_K_P,
44  YAW_K_D,
45  VEL_K_P,
46  VEL_K_D,
47  ROT_K_P,
48  ROT_K_D) {
49  RegisterAnchorMethod<CPointMass3DEyeBotModel>(
50  GetEmbodiedEntity().GetAnchor("perspective_camera"),
52  }
53 
54  /****************************************/
55  /****************************************/
56 
58  s_anchor.Position = m_cPosition;
59  }
60 
61  /****************************************/
62  /****************************************/
63 
65 
66  /****************************************/
67  /****************************************/
68 
69 }
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
REGISTER_STANDARD_POINTMASS3D_OPERATIONS_ON_ENTITY(CEyeBotEntity, CPointMass3DEyeBotModel)
An anchor related to the body of an entity.
Definition: physics_model.h:38
CVector3 Position
The position of the anchor wrt the global coordinate system.
Definition: physics_model.h:51
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
CPointMass3DEyeBotModel(CPointMass3DEngine &c_engine, CEyeBotEntity &c_eyebot)
void UpdatePerspectiveCameraAnchor(SAnchor &s_anchor)
CVector3 m_cPosition
The position of the model in this engine.