Intro
I'm working on an RL environment, and wanted to compare various actuator settings' effects on the learning. I noticed that having defaults of one subclass of actuators in an MJCF sets the params of other subclasses defined.
I know that the actuator subclasses are just shorthands for parameter settings and that almost everything is implemented as general actuators under the hood (with a bit of special treatment for muscles), but this is still a surprising outcome for me.
My setup
Using Linux and the Python API, MuJoCo version 3.12.
What's happening? What did you expect?
I would expect that defining defaults for one actuator subclass would leave other actuators unaffected. i.e., if I have a position default defined, and a position , a motor and a muscle actuator in the MJCF, only the position actuator should be affected.
Steps for reproduction
- Load the model below in Python.
- Print biasprm.
Minimal model for reproduction
minimal XML
<mujoco model="mvp">
<default>
<joint type="hinge" pos="0 0 0" axis="1 0 0" stiffness="5" damping="0.01"/>
<position ctrllimited="true" ctrlrange="0 1" kp="2" kv="3"/>
</default>
<worldbody>
<body pos="0 0 0">
<geom name="arm" type="capsule" size="0.005" fromto="0 0 0 0 0.1 0" rgba=".5 .1 .1 1"/>
<joint name="shoulder"/>
</body>
</worldbody>
<actuator>
<motor name="m1" joint="shoulder"/>
</actuator>
</mujoco>
Code required for reproduction
import mujoco
xml_path="mvp.xml"
print(mujoco.MjModel.from_xml_path(xml_path).actuator_biasprm[0])
Confirmations
Intro
I'm working on an RL environment, and wanted to compare various actuator settings' effects on the learning. I noticed that having defaults of one subclass of actuators in an MJCF sets the params of other subclasses defined.
I know that the actuator subclasses are just shorthands for parameter settings and that almost everything is implemented as general actuators under the hood (with a bit of special treatment for muscles), but this is still a surprising outcome for me.
My setup
Using Linux and the Python API, MuJoCo version 3.12.
What's happening? What did you expect?
I would expect that defining defaults for one actuator subclass would leave other actuators unaffected. i.e., if I have a
positiondefault defined, and aposition, amotorand amuscleactuator in the MJCF, only thepositionactuator should be affected.Steps for reproduction
Minimal model for reproduction
minimal XML
Code required for reproduction
Confirmations