Obtaining accelerations of segment CoM
Posted: Fri Jan 26, 2018 11:50 am
Hi
We are attempting to extract all the forces (muscle, reaction, inertial and gravitational) acting on a particular body at each frame in time.
We’re currently having issues trying to obtain accurate values for the acceleration components and were wondering if you could point us into the right direction. We’re trying to realize the states to include accelerations. Our understanding is that the acceleration which OpenSim can output (via getSimbodyEngine.getAcceleration) calculates accelerations based on F=ma and therefore the forces acting on the system are required (Muscle forces and Ground Reaction Forces) as well as positions and velocity. Is this correct, or would only GRF suffice (as inverse dynamics does not include muscle forces, but does assume accelerations to be known)?
The current approach we are taking is to update the state frame-by-frame. We can get the model to realize the positions in the form of the joint coordinates(velocities) (state.updQ and state.updU, obtained through state reporter) but I am not sure how to apply an external force to the model. The values attained from just providing position information provide realistic velocity values, but very high acceleration values which can be explained by the lack of forces and the way OpenSim (or Simbody) realizes dynamics through F=ma rather than obtaining accelerations though double differentiation of positions.
Is my thinking correct in terms of having to provide both position and forces to the state in order to calculate the accelerations? And if so, what is the correct process for providing the state with the correct force values in order to be able to execute osimModel.computeStateVariableDerivatives(state)?
Thank you for this, and we’re happy to provide any snippets of code if needed.
Michael
We are attempting to extract all the forces (muscle, reaction, inertial and gravitational) acting on a particular body at each frame in time.
We’re currently having issues trying to obtain accurate values for the acceleration components and were wondering if you could point us into the right direction. We’re trying to realize the states to include accelerations. Our understanding is that the acceleration which OpenSim can output (via getSimbodyEngine.getAcceleration) calculates accelerations based on F=ma and therefore the forces acting on the system are required (Muscle forces and Ground Reaction Forces) as well as positions and velocity. Is this correct, or would only GRF suffice (as inverse dynamics does not include muscle forces, but does assume accelerations to be known)?
The current approach we are taking is to update the state frame-by-frame. We can get the model to realize the positions in the form of the joint coordinates(velocities) (state.updQ and state.updU, obtained through state reporter) but I am not sure how to apply an external force to the model. The values attained from just providing position information provide realistic velocity values, but very high acceleration values which can be explained by the lack of forces and the way OpenSim (or Simbody) realizes dynamics through F=ma rather than obtaining accelerations though double differentiation of positions.
Is my thinking correct in terms of having to provide both position and forces to the state in order to calculate the accelerations? And if so, what is the correct process for providing the state with the correct force values in order to be able to execute osimModel.computeStateVariableDerivatives(state)?
Thank you for this, and we’re happy to provide any snippets of code if needed.
Michael