Page 1 of 1

OpenSim JAM "computePotentialEnergy"

Posted: Wed Jan 05, 2022 1:54 am
by giacomodr25
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

Re: OpenSim JAM "computePotentialEnergy"

Posted: Fri May 26, 2023 9:16 am
by modenaxe
Hello, I have a very similar issue with another function of OpenSim JAM, also taking the State at Stage Position as input.
DId you manage to solve the issue by any chance?
Thank you,
Luca