How to get the geometry position of hyfydy model in SCONE

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
POST REPLY
User avatar
Yuichiro Omura
Posts: 44
Joined: Thu Apr 04, 2019 10:03 pm

How to get the geometry position of hyfydy model in SCONE

Post by Yuichiro Omura » Wed Aug 24, 2022 11:46 pm

Hi.
I want to get the geometry position of the Hyfydy model in SCONE to use it for simulations (e.g., falling determination using the base of support).
My model has four sphere geometry in each foot.
I understand I can get the global location of geometry by setting geometry position as vec3:new(x, y, z) and using point_pos().
However, since the simulation uses various models, this method requires rewriting the code each time.
Is there any way to get the geometry position directly from the Hyfydy model?

User avatar
Thomas Geijtenbeek
Posts: 461
Joined: Wed Mar 12, 2014 8:08 am

Re: How to get the geometry position of hyfydy model in SCONE

Post by Thomas Geijtenbeek » Thu Aug 25, 2022 1:11 am

Unfortunately, the SCONE scripting interface does not provide access to collision geometry of the model.

The best workaround I can think of is to add 'foot_length' and 'foot_width' parameters to your script (or something similar that fits your need). This way, you can use the same Lua code; you only need to update the parameter values inside the ScriptController section of your .scone file, whenever you change the model.

Please let me know if you consider this a viable workaround.

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

Re: How to get the geometry position of hyfydy model in SCONE

Post by Yuichiro Omura » Wed Aug 31, 2022 1:14 am

Thank you for the solution!
I will try to use that way.

POST REPLY