Page 1 of 1

How to get the geometry position of hyfydy model in SCONE

Posted: Wed Aug 24, 2022 11:46 pm
by yuichiro1929729
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?

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

Posted: Thu Aug 25, 2022 1:11 am
by tgeijten
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.

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

Posted: Wed Aug 31, 2022 1:14 am
by yuichiro1929729
Thank you for the solution!
I will try to use that way.