Creating custom XML shortcut in Mujoco

109 views Asked by At

I am working with Mujoco to do some simulation of robots with an actuator prototype that is in development. Is it possible in Mujoco to create own xml shortcuts to not having to specify the specific parameters in every actuator I create. For example if I have something like

<actuator>
  <general><name="act_0" tendon="tnd_left" gaintype="user" acttype="user" lengthrange="0.2 1.7"... ></general>
</actuator>

is there a possibility to create some custom XML shortcut with these parameters as defaults to be able to just use

<actuator>
  <my_actuator><name="act_0" tendon="tnd_left"></my_actuator>
</actuator>
1

There are 1 answers

0
Tom Erez On

MuJoCo has a CSS-like defaults system, which in principle should be just what you're looking for. I'm practice, I vaguely remember certain actuator properties aren't available, so give it a try and create an issue in the GitHub repo if you're missing something.