Choreonoid  1.8
ForwardDynamicsABM.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_FORWARD_DYNAMICS_ABM_H
7 #define CNOID_BODY_FORWARD_DYNAMICS_ABM_H
8 
9 #include "ForwardDynamics.h"
10 #include "exportdecl.h"
11 
12 namespace cnoid
13 {
17 class CNOID_EXPORT ForwardDynamicsABM : public ForwardDynamics
18 {
19 public:
20  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
21 
22  ForwardDynamicsABM(DySubBody* subBody);
24 
25  virtual void initialize();
26  virtual void calcNextState();
27  virtual void refreshState();
28 
29 private:
30 
31  void calcMotionWithEulerMethod();
32  void integrateRungeKuttaOneStep(double r, double dt);
33  void calcMotionWithRungeKuttaMethod();
34 
38  void calcABMPhase1(bool updateNonSpatialVariables);
39 
43  void calcABMPhase2();
44  void calcABMPhase2Part1();
45  void calcABMPhase2Part2();
46 
50  void calcABMPhase3();
51 
52  inline void calcABMFirstHalf();
53  inline void calcABMLastHalf();
54 
55  void updateForceSensors();
56 
57  // Buffers for the Runge Kutta Method
58  Isometry3 T0;
59  Vector3 vo0;
60  Vector3 w0;
61  std::vector<double> q0;
62  std::vector<double> dq0;
63 
64  Vector3 vo;
65  Vector3 w;
66  Vector3 dvo;
67  Vector3 dw;
68  std::vector<double> dq;
69  std::vector<double> ddq;
70 };
71 
72 }
73 
74 #endif
cnoid::Vector3
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
cnoid::Isometry3
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
cnoid::DySubBody
Definition: DyBody.h:23
cnoid::ForwardDynamicsABM
Definition: ForwardDynamicsABM.h:17
cnoid
Definition: AbstractSceneLoader.h:11
ForwardDynamics.h
cnoid::ForwardDynamics
Definition: ForwardDynamics.h:22