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

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Yuichiro Omura
Posts: 44
Joined: Thu Apr 04, 2019 10:03 pm

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

Post by Yuichiro Omura » Fri Nov 26, 2021 1:38 am

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

Tags:

User avatar
Thomas Uchida
Posts: 1789
Joined: Wed May 16, 2012 11:40 am

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

Post by Thomas Uchida » Fri Nov 26, 2021 6:07 pm

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".

User avatar
Yuichiro Omura
Posts: 44
Joined: Thu Apr 04, 2019 10:03 pm

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

Post by Yuichiro Omura » Mon Nov 29, 2021 6:42 pm

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.

POST REPLY