OpenSim JAM "computePotentialEnergy"
Posted: Wed Jan 05, 2022 1:54 am
Hi all,
I'm working with OpenSim JAM, developed by Colin Smith. I was trying to calculate the contact energy between the cartilage mesh with the function "computePotentialEnergy". It requires as input an opensim.modelling.State element and give as output a double number. I don't understand if the state are related to the kinematics states of the model or to the force state.
What I tried until now is - with MATLAB:
import org.opensim.modeling.*
SmithTool = Smith2018ArticularContactForce();
ik_states = comak_ik.get_states() % in the comak_ik there is the kinematics saved
U = SmithTool.computePotentialEnergy(ik_states )
But it gives me an error on the input used.
Thank you in advance for any advice or tips.
Giacomo Di Raimondo
I'm working with OpenSim JAM, developed by Colin Smith. I was trying to calculate the contact energy between the cartilage mesh with the function "computePotentialEnergy". It requires as input an opensim.modelling.State element and give as output a double number. I don't understand if the state are related to the kinematics states of the model or to the force state.
What I tried until now is - with MATLAB:
import org.opensim.modeling.*
SmithTool = Smith2018ArticularContactForce();
ik_states = comak_ik.get_states() % in the comak_ik there is the kinematics saved
U = SmithTool.computePotentialEnergy(ik_states )
But it gives me an error on the input used.
Thank you in advance for any advice or tips.
Giacomo Di Raimondo