864b805a6e
The introduction of site specification to connects and welds in 3.2.3 conditionally changed the semantics of `mjData.eq_obj1id` and `mjData.eq_obj2id`. These changes were not properly propagated in several places leading to incorrect computations of constraint inertia, readings of affected force/torque sensors and runtime enabling/disabling of such constraints. PiperOrigin-RevId: 690670420 Change-Id: I55ee8a013cbee8457f8d6c7f33c2981aedafbab6
82 lines
1.9 KiB
XML
82 lines
1.9 KiB
XML
<!--
|
|
test model for constraint islanding:
|
|
- 7 equalities (1:joint, 6:connect)
|
|
- 1 limit
|
|
- 2 friction constraints
|
|
- 1 unconstrained dof
|
|
- 4 islands, 2 with non-contiguous dofs
|
|
-->
|
|
|
|
<mujoco>
|
|
<option>
|
|
<flag island="enable"/>
|
|
</option>
|
|
|
|
<default>
|
|
<geom size=".1"/>
|
|
</default>
|
|
|
|
<visual>
|
|
<headlight diffuse=".9 .9 .9"/>
|
|
</visual>
|
|
|
|
<worldbody>
|
|
|
|
<body>
|
|
<joint type="slide" axis="0 0 1" range="0 1" limited="true"/>
|
|
<geom/>
|
|
</body>
|
|
|
|
<body pos=".25 0 0">
|
|
<joint type="slide" axis="1 0 0"/>
|
|
<geom/>
|
|
</body>
|
|
|
|
<body pos="0 0 0.25">
|
|
<joint type="slide" axis="0 0 1"/>
|
|
<geom/>
|
|
<body pos="0 -.15 0">
|
|
<joint name="hinge1" axis="0 1 0"/>
|
|
<geom type="capsule" size="0.03" fromto="0 0 0 -.2 0 0"/>
|
|
<body pos="-.2 0 0">
|
|
<joint axis="0 1 0"/>
|
|
<geom type="capsule" size="0.03" fromto="0 0 0 -.2 0 0"/>
|
|
</body>
|
|
</body>
|
|
</body>
|
|
|
|
<body pos=".5 0 0">
|
|
<joint type="slide" axis="0 0 1" frictionloss="15"/>
|
|
<geom type="box" size=".08 .08 .02" euler="0 10 0"/>
|
|
</body>
|
|
|
|
<body pos="-.5 0 0">
|
|
<joint axis="0 1 0" frictionloss=".01"/>
|
|
<geom type="capsule" size="0.03" fromto="0 0 0 -.2 0 0"/>
|
|
</body>
|
|
|
|
<body pos="0 0 .5">
|
|
<joint name="hinge2" axis="0 1 0"/>
|
|
<geom type="box" size=".08 .02 .08"/>
|
|
</body>
|
|
|
|
<body pos=".5 0 .1">
|
|
<freejoint/>
|
|
<geom type="box" size=".03 .03 .03" pos="0.01 0.01 0.01"/>
|
|
</body>
|
|
|
|
<site name="0" pos="-.45 -.05 .35"/>
|
|
<body pos="-.5 0 .3" name="connect">
|
|
<freejoint/>
|
|
<geom type="box" size=".05 .05 .05"/>
|
|
<site name="1" pos=".05 -.05 .05"/>
|
|
</body>
|
|
</worldbody>
|
|
|
|
<equality>
|
|
<joint joint1="hinge1" joint2="hinge2"/>
|
|
<connect body1="connect" body2="world" anchor="-.05 -.05 .05"/>
|
|
<connect site1="0" site2="1"/>
|
|
</equality>
|
|
</mujoco>
|