76b48b8e61
PiperOrigin-RevId: 677823461 Change-Id: Iab20e042695dfad416d61fa7cc938faba8c7a6b6
116 lines
4.8 KiB
XML
116 lines
4.8 KiB
XML
<!-- For validating constraint dynamics:
|
|
|
|
* connect, weld, joint constraints
|
|
* collision and joint limits for ball and 1d joints
|
|
* solref, solimp
|
|
-->
|
|
<mujoco>
|
|
<option timestep="0.015" impratio="1.5"/>
|
|
|
|
<default>
|
|
<default class="box">
|
|
<geom type="box" size=".2" fromto="0 0 0 0 -2 0" rgba=".4 .7 .6 .3" contype="0"/>
|
|
</default>
|
|
</default>
|
|
|
|
<worldbody>
|
|
<geom pos="0 0 -1" type="plane" size="20 20 .01" condim="1"/>
|
|
|
|
<site name="site0" pos="0 0 1"/>
|
|
<body pos="0 0 1">
|
|
<freejoint/>
|
|
<geom class="box"/>
|
|
<site name="site1"/>
|
|
</body>
|
|
|
|
<site name="site2" pos="0 -1 1"/>
|
|
<body pos="0 -1 1">
|
|
<freejoint/>
|
|
<geom class="box"/>
|
|
<site name="site3"/>
|
|
</body>
|
|
|
|
<body name="anchor1" pos="-3 0 0"/>
|
|
<body name="beam1" pos="-3 0 0">
|
|
<joint name="joint1" type="ball" range="0 45" solreflimit="0.03 0.9" solimplimit="0.89 0.9 0.01 2.1"/>
|
|
<geom class="box"/>
|
|
</body>
|
|
|
|
<body name="anchor2" pos="-1 0 0"/>
|
|
<body name="beam2" pos="-1 0 0">
|
|
<freejoint align="false"/>
|
|
<geom class="box"/>
|
|
</body>
|
|
|
|
<body name="beam3" pos="1 0 0">
|
|
<joint name="joint3" axis="1 0 0" type="hinge" range="-20 20" frictionloss="0.1"/>
|
|
<geom class="box"/>
|
|
</body>
|
|
|
|
<body name="beam4" pos="3 0 0">
|
|
<joint name="joint4" axis="1 0 0" type="hinge" damping="1.0"/> <!-- tests no joint range -->
|
|
<geom class="box"/>
|
|
</body>
|
|
|
|
<body name="beam5" pos="-2 0 0" euler="45 45 0">
|
|
<joint name="joint5" type="ball" range="0 45" solreflimit="-100 -1"/> <!-- test negative solref -->
|
|
<geom class="box" contype="0" conaffinity="0"/>
|
|
</body>
|
|
|
|
<body name="box_condim1" pos="4 0 0">
|
|
<freejoint align="false"/>
|
|
<geom class="box" condim="1"/>
|
|
</body>
|
|
|
|
<body name="box_condim3" pos="5 0 0">
|
|
<freejoint align="false"/>
|
|
<geom class="box" condim="3"/>
|
|
</body>
|
|
|
|
<body name="box_condim4" pos="6 0 0">
|
|
<freejoint align="false"/>
|
|
<geom class="box" condim="4"/>
|
|
</body>
|
|
|
|
<body name="box_condim6" pos="7 0 0">
|
|
<freejoint align="false"/>
|
|
<geom class="box" condim="6"/>
|
|
</body>
|
|
</worldbody>
|
|
|
|
<tendon>
|
|
<fixed name="tendon_1" limited="true" range="-0.3 0.1" stiffness=".1" damping=".2" frictionloss="0.1">
|
|
<joint joint="joint3" coef=".1"/>
|
|
<joint joint="joint4" coef="-.2"/>
|
|
</fixed>
|
|
<fixed name="tendon_2" limited="true" range="-0.3 2" solreflimit="0.03 0.9" solimplimit="0.89 0.9 0.01 2.1">
|
|
<joint joint="joint4" coef=".3"/>
|
|
<joint joint="joint5" coef="-.4"/>
|
|
</fixed>
|
|
</tendon>
|
|
|
|
<equality>
|
|
<connect name="c_site" site1="site0" site2="site1"/>
|
|
<connect name="connect" body1="anchor1" body2="beam1" anchor="1 0 -1" />
|
|
<weld name="w_site" site1="site2" site2="site3" torquescale="0.1"/>
|
|
<weld name="weld" body1="anchor2" body2="beam2" relpose="0 0 0 1 -.3 0 0" torquescale="0.002" anchor="0 -2 0"/>
|
|
<joint name="joint" joint1="joint3" joint2="joint4" polycoef="0.5 -1 0.1 0.15 0.2" />
|
|
<tendon name="tendon" tendon1="tendon_1" tendon2="tendon_2" polycoef="0.5 -1 0.1 0.15 0.2"/>
|
|
</equality>
|
|
|
|
<actuator>
|
|
<position ctrlrange="-20 20" gear="500" joint="joint1" kv="0.5" name="act1"/>
|
|
<motor gear="50000" joint="joint3" name="act2"/>
|
|
<motor gear="75000" joint="joint4" name="act3"/>
|
|
</actuator>
|
|
|
|
<keyframe>
|
|
<!-- keyframe 0: default position with some motion, zero contacts -->
|
|
<key qpos='-1 -1 1 1 0 0 0 -2 -2 1 1 0 0 0 1 0 0 0 -1 0 0 1 0 0 0 0 0 1 0 0 0 4 0 0 1 0 0 0 5 0 0 1 0 0 0 6 0 0 1 0 0 0 7 0 0 1 0 0 0' qvel='1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1'/>
|
|
<!-- keyframe 1: some contacts but constraints are quadratic -->
|
|
<key qpos='-1 -1 1 1 0 0 0 -2 -2 1 1 0 0 0 1 0.0011 -8.2e-07 -0.0011 -0.82 1.9 -0.58 0.97 -0.14 0.17 -0.069 0.22 0.29 0.93 0.2 0.15 0.28 4.3 0.23 -0.26 0.97 0.12 0.11 0.18 5.4 0.25 -0.26 0.97 0.11 0.16 0.17 6.4 0.25 -0.26 0.97 0.11 0.16 0.17 7.4 0.25 -0.26 0.97 0.11 0.16 0.17' qvel='1 1 1 1 1 1 1 1 1 1 1 1 -0.14 3.3e-05 0.14 -0.14 -0.93 -3.6 -1.8 1 -0.57 -0.16 0.21 1.1 1 2.2 0.65 1.3 -4.2 -2.6 -5.6 0.54 1.6 2.8 -3.7 -2.3 0.7 -1.8 1.6 2.8 -3.7 -2.3 0.62 -1.8 1.6 2.8 -3.7 -2.3 0.61 -1.8'/>
|
|
<!-- keyframe 2: some contacts and some constraints are in cone state (for elliptic) -->
|
|
<key qpos='-1 -1 1 1 0 0 0 -2 -2 1 1 0 0 0 1 0.0087 2.4e-07 -0.0086 -0.89 1.8 -0.77 0.98 -0.2 -0.0022 -0.026 0.19 0.33 0.86 0.32 0.064 0.38 4.4 0.36 -0.81 0.97 -0.0013 -0.0011 0.25 5.6 0.52 -0.75 0.98 -0.018 0.17 0.094 6.6 0.52 -0.75 0.98 -0.017 0.16 0.094 7.6 0.52 -0.76 0.98 -0.017 0.16 0.094' qvel='1 1 1 1 1 1 1 1 1 1 1 1 0.2 -1.8e-05 -0.2 -0.72 0.072 0.025 0.015 -4.9 0.35 -0.22 0.26 0.99 -4.6 1.7 1.1 0.52 -0.73 0.16 7.9 1 0.043 -0.042 1.3 1.6 -1.6 0.98 0.027 -0.024 1.3 1.6 -1.8 0.96 0.025 -0.022 1.3 1.6 -1.8 0.96'/>
|
|
</keyframe>
|
|
</mujoco>
|