Page 1 of 1
"defaults" in xml files
Posted: Fri Nov 11, 2011 8:05 pm
by skylsj
Hi all,
I'm wondering the meaning of "defaults" in xml files.
(<Force name="default"> in actuator sets, <ControlLinear name="default"> in control constraints sets etc.)
What happens when I change these values?
Thanks,
Lee, Sang Jun
Re: "defaults" in xml files
Posted: Sat Nov 12, 2011 3:26 pm
by aymanh
Hi Sang Jun,
The defaults section at the top of our xml/osim files does not represent actual objects instead it serves two purposes:
1. If an object appears in the defaults section, then appears later in the file with some unspecified attributes/values then those in the defaults section are used. For example instead of changing <min_control> for all muscles in a model to be 0.1 instead of 0.0 you can leave out <min_control> completely from all muscles and instead specify <min_control> as 0.1 in the <defaults> section. The intention is that this leads to less XML editing/error-prone and can make the files smaller.
2. Another potential use of default objects is to be used as templates to know what's the XML representation of various objects. This function can be done using other tools (e.g. Help->Available Objects in the Gui).
Hope this helps and please let us know if you continue to have questions.
Best regards,
-Ayman
Re: "defaults" in xml files
Posted: Wed Nov 16, 2011 12:29 am
by skylsj
Ayman,
thank you for your great answer.
Lee, Sang Jun