-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
When loading an MJCF file that uses , MuJoCo throws the following error:
model = mujoco.MjModel.from_xml_path("rover4We-field.xml")
ValueError: XML Error: top-level default class 'main' cannot be renamed
Element 'default', line 0
This happens due to this section in rover4We-only.xml:
<default>
<!--making every geom collidable. expect those that dont are default-->
<geom contype="1" conaffinity="1"/>
</default>
<default class="acker_solver_param">
<!--solver impedance and reference(?) for ackerman equality constraint-->
<!--default solimp: "0.900 0.950 0.001"-->
<!--default solref: "0.020 1.000"-->
<!--solref: (timeconst, dampratio)
b = 2 / (dmax * timeconst)
k = d(r) / (dmax * dmax * timeconst * timeconst * dampratio * dampratio)
-->
<equality solimp="0.9950 0.9990 0.0001" solref="0.0100 0.7500"/>
</default>
There is an error in the placement of the top default tag. The default tag with the acker_solver_param class should be contained within the top default tag. The correction that worked for me is:
<default>
<!--making every geom collidable. expect those that dont are default-->
<geom contype="1" conaffinity="1"/>
<default class="acker_solver_param">
<!--solver impedance and reference(?) for ackerman equality constraint-->
<!--default solimp: "0.900 0.950 0.001"-->
<!--default solref: "0.020 1.000"-->
<!--solref: (timeconst, dampratio)
b = 2 / (dmax * timeconst)
k = d(r) / (dmax * dmax * timeconst * timeconst * dampratio * dampratio)
-->
<equality solimp="0.9950 0.9990 0.0001" solref="0.0100 0.7500"/>
</default>
</default>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels