6 #ifndef CNOID_BODY_FORWARD_DYNAMICS_CBM_H
7 #define CNOID_BODY_FORWARD_DYNAMICS_CBM_H
10 #include "exportdecl.h"
15 class ForceSensorDevice;
32 virtual void initialize();
33 virtual void calcNextState();
34 virtual void refreshState();
36 void complementHighGainModeCommandValues();
38 void initializeAccelSolver();
39 void sumExternalForces();
40 void solveUnknownAccels();
41 void solveUnknownAccels(
const Vector3& fext,
const Vector3& tauext);
67 std::vector<DyLink*> torqueModeJoints;
68 std::vector<DyLink*> highGainModeJoints;
74 bool isNoUnknownAccelMode;
84 bool accelSolverInitialized;
109 std::vector<double> q0;
110 std::vector<double> dq0;
116 std::vector<double> dq;
117 std::vector<double> ddq;
119 virtual void initializeSensors();
121 void calcMotionWithEulerMethod();
122 void calcMotionWithRungeKuttaMethod();
123 void integrateRungeKuttaOneStep(
double r,
double dt);
124 void preserveHighGainModeJointState();
125 void calcPositionAndVelocityFK();
127 void setColumnOfMassMatrix(MatrixXd& M,
int column);
130 inline void calcAccelFKandForceSensorValues();
131 void calcAccelFKandForceSensorValues(
DyLink* link,
Vector3& out_f,
Vector3& out_tau,
bool isSubBodyRoot);
132 void updateForceSensors();