Calculate COM acceleration
Posted: Mon Mar 24, 2014 9:50 am
Dear Opensim users,
I would like to use the position, velocity and acceleration of my model as input for a controller. Inside my controller class, I’m able to calculate the position and velocity of the whole body COM. (s = state)
--- SimTK::Vec3 com_position =getModel().calcMassCenterPosition(s);
--- SimTK::Vec3 com_velocity =getModel().calcMassCenterVelocity(s);
However, I’m not able to calculate the acceleration of the whole body COM.
--- SimTK::Vec3 com_acc =getModel().calcMassCenterAcceleration(s);
I tried to compute the state derivatives first, but this doesn't solve the problem.
--- getModel().computeStateVariableDerivatives(s);
--- SimTK::Vec3 com_acc =getModel().calcMassCenterAcceleration(s);
Can somebody help me with this problem?
Regards,
Maarten
I would like to use the position, velocity and acceleration of my model as input for a controller. Inside my controller class, I’m able to calculate the position and velocity of the whole body COM. (s = state)
--- SimTK::Vec3 com_position =getModel().calcMassCenterPosition(s);
--- SimTK::Vec3 com_velocity =getModel().calcMassCenterVelocity(s);
However, I’m not able to calculate the acceleration of the whole body COM.
--- SimTK::Vec3 com_acc =getModel().calcMassCenterAcceleration(s);
I tried to compute the state derivatives first, but this doesn't solve the problem.
--- getModel().computeStateVariableDerivatives(s);
--- SimTK::Vec3 com_acc =getModel().calcMassCenterAcceleration(s);
Can somebody help me with this problem?
Regards,
Maarten