How to define Body Forces in Inverse Dynamics Solver in Matlab.
Posted: Mon May 24, 2021 6:27 am
Hi,
I have already done the Inverse Dynamics simulation without the external force using the following command.
tau = InverseDynamicsSolver.solve(ID_state, u_dot).
Here I set u_dot as desired joint accelerations and state consisting of desired current joint position and velocity. I iterated the above process for every time instance and got the results which I would got from OpenSim GUI.
But when external body force is applied, then what will be the process of doing inverse dynamics with the above method.
Using the command below, I wanted to do Inverse Dynamics simulation with an externally applied body force (force and torque at say 'forearm' of the arm26 model)
InverseDynamicsSolver::solve ( const SimTK::State & s,
const SimTK::Vector & udot,
const SimTK::Vector & appliedMobilityForces,
const SimTK::Vector_< SimTK::SpatialVec > & appliedBodyForces
)
How can I define this SpatialVec for a general spatial force acting on a particular point of forearm (where force magnitude and point location can be expressed in global frame)?
Thanks.
I have already done the Inverse Dynamics simulation without the external force using the following command.
tau = InverseDynamicsSolver.solve(ID_state, u_dot).
Here I set u_dot as desired joint accelerations and state consisting of desired current joint position and velocity. I iterated the above process for every time instance and got the results which I would got from OpenSim GUI.
But when external body force is applied, then what will be the process of doing inverse dynamics with the above method.
Using the command below, I wanted to do Inverse Dynamics simulation with an externally applied body force (force and torque at say 'forearm' of the arm26 model)
InverseDynamicsSolver::solve ( const SimTK::State & s,
const SimTK::Vector & udot,
const SimTK::Vector & appliedMobilityForces,
const SimTK::Vector_< SimTK::SpatialVec > & appliedBodyForces
)
How can I define this SpatialVec for a general spatial force acting on a particular point of forearm (where force magnitude and point location can be expressed in global frame)?
Thanks.