Page 1 of 1

How to get the position (and angle) of segments in ground using storage

Posted: Fri Nov 26, 2021 1:38 am
by yuichiro1929729
Hi

I use the model to simulate postural control.
I want to get the position of segments in ground axis using storage, after the simulations.
I know that I can get ones using the function transformposition() in simulation, but I don't know how to obtain ones from storage.
Storage has values of each joints.
Can I record the segments position in storage? or calculate ones from storage using some functions?

Best regards,
Omura

Re: How to get the position (and angle) of segments in ground using storage

Posted: Fri Nov 26, 2021 6:07 pm
by tkuchida
The easiest strategy (depending on how you are performing your simulation) might be to use an OutputReporter (https://simtk.org/api_docs/opensim/api_ ... orter.html) to record the position of each body segment relative to ground. The relevant output can be found in the Body class documentation (https://simtk.org/api_docs/opensim/api_ ... 1Body.html) under the heading "OpenSim Properties, Sockets, Outputs, Inputs inherited from OpenSim::Frame"; the output is named "position".

Re: How to get the position (and angle) of segments in ground using storage

Posted: Mon Nov 29, 2021 6:42 pm
by yuichiro1929729
Thank you for your quick response!
I could record the positions and refer to these.

PS
I found out that I can also record the position to storage using the function about analysisset by referring the URL.
Thanks.