dynamics3d_epuck_model.h
Go to the documentation of this file.
1 
7 #ifndef DYNAMICS3D_EPUCK_MODEL_H
8 #define DYNAMICS3D_EPUCK_MODEL_H
9 
10 namespace argos {
11  class CDynamics3DEPuckModel;
12  class CEPuckEntity;
13  class CWheeledEntity;
14 }
15 
16 #include <argos3/plugins/simulator/physics_engines/dynamics3d/bullet/BulletDynamics/Featherstone/btMultiBodyJointMotor.h>
17 #include <argos3/plugins/simulator/physics_engines/dynamics3d/bullet/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h>
18 #include <argos3/plugins/simulator/physics_engines/dynamics3d/dynamics3d_multi_body_object_model.h>
19 
20 namespace argos {
21 
23 
24  public:
25 
27  CEPuckEntity& c_epuck);
28 
30 
31  virtual void Reset();
32 
33  virtual void CalculateBoundingBox();
34 
35  virtual void UpdateEntityStatus();
36 
37  virtual void UpdateFromEntityStatus();
38 
39  virtual void AddToWorld(btMultiBodyDynamicsWorld& c_world);
40 
41  virtual void RemoveFromWorld(btMultiBodyDynamicsWorld& c_world);
42 
43  private:
44  /* joint constraints */
45  std::unique_ptr<btMultiBodyJointMotor> m_ptrLeftMotor;
46  std::unique_ptr<btMultiBodyJointMotor> m_ptrRightMotor;
47  /* links */
48  std::shared_ptr<CBase> m_ptrBody;
49  std::shared_ptr<CLink> m_ptrLeftWheel;
50  std::shared_ptr<CLink> m_ptrRightWheel;
51  /* entities */
52  CWheeledEntity& m_cWheeledEntity;
53  /* lower base data */
54  static const btVector3 m_cBodyHalfExtents;
55  static const btScalar m_fBodyMass;
56  static const btTransform m_cBodyOffset;
57  static const btTransform m_cBodyGeometricOffset;
58  /* wheel data */
59  static const btVector3 m_cWheelHalfExtents;
60  static const btScalar m_fWheelMass;
61  static const btTransform m_cWheelGeometricOffset;
62  static const btTransform m_cLeftWheelOffset;
63  static const btTransform m_cRightWheelOffset;
64  static const btVector3 m_cBodyToRightWheelJointOffset;
65  static const btVector3 m_cRightWheelToBodyJointOffset;
66  static const btQuaternion m_cBodyToRightWheelJointRotation;
67  static const btVector3 m_cBodyToLeftWheelJointOffset;
68  static const btVector3 m_cLeftWheelToBodyJointOffset;
69  static const btQuaternion m_cBodyToLeftWheelJointRotation;
70  static const btScalar m_fWheelMotorMaxImpulse;
71  static const btScalar m_fWheelFriction;
72  };
73 }
74 
75 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
virtual void AddToWorld(btMultiBodyDynamicsWorld &c_world)
CDynamics3DEPuckModel(CDynamics3DEngine &c_engine, CEPuckEntity &c_epuck)
virtual void UpdateEntityStatus()
Updates the status of the associated entity.
virtual void UpdateFromEntityStatus()
Updates the state of this model from the status of the associated entity.
virtual void CalculateBoundingBox()
Calculates the axis-aligned box that contains the entire physics model.
virtual void RemoveFromWorld(btMultiBodyDynamicsWorld &c_world)