Hi all
I'm trying to learn more about how the getAccelerations function works in order to validate that a process being constructed through the MATLAB API is extracting the correct results.
Currently I'm simply attempting to extract the acceleration of a simple cube body which has only a single translation motion in one direction relative to the ground (with zero gravitational acceleration).
Through updating the state in the model the correct displacement and velocity of the model can be extracted but the accelerations (after calling ComputeStateVariableDerivatives) come out to be a zero value. I know getAccelerations calculates acceleration based on forces (F=ma) so it makes sense that the call outputs zero if the model has no forces or actuators associated with it.
My confusion however comes from an earlier test I did with the Arm26 model. Using the same method to extract the body acceleration (update the state variables and call ComputeStateVariableDerivatives for each time frame) and removing all the muscles and gravitational forces from the model (so it has no forces or actuators, as with the above test with only the translating cube). For this model however the accelerations of the r_ulna_radius_hand body were not zero.
What is different between these models? Why does one yield zero accelerations with only motion and no incident forces and the other non-zero accelerations?
Thanks and regards
Michael
How does getAccelerations consider forces?
- Michael Woodward
- Posts: 10
- Joined: Tue Jun 20, 2017 3:47 am
- Thomas Uchida
- Posts: 1787
- Joined: Wed May 16, 2012 11:40 am
Re: How does getAccelerations consider forces?
Does the SimTK::Vector returned by Model::computeStateVariableDerivatives() contain the correct accelerations?
- Michael Woodward
- Posts: 10
- Joined: Tue Jun 20, 2017 3:47 am
Re: How does getAccelerations consider forces?
Hi Tom, sorry for the late reply
For the Arm26 model yes it does, assuming the call is returning the accelerations of the generalised coordinates described by the state (essential Udot?). The block model I'm analysing returns zero values for this call, despite having Q and U values in the state.
For the Arm26 model yes it does, assuming the call is returning the accelerations of the generalised coordinates described by the state (essential Udot?). The block model I'm analysing returns zero values for this call, despite having Q and U values in the state.