Files
Mujoco_WASM/test/engine/testdata/tendon_springlength.xml
T
Yuval Tassa 893942a729 Allow tendon springlength attribute to take two values between which the spring produces no force (a deadband).
If given two non-decreasing values, `springlength` specifies a deadband for spring stiffness, inside of which the force is 0 and outside of which force behaves like a regular spring, with the setpoint corresponding to the nearest value. This can be used to create tendons whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See test/engine/testdata/tendon_springlength.xml example model.

Spring-limited spatial tendons whose lower range value is 0 are rendered as catenaries.

Fixes #520.

PiperOrigin-RevId: 484509706
Change-Id: I6698e94ee36168f52d501e83057559805e05172d
2022-10-28 05:57:37 -07:00

31 lines
679 B
XML

<mujoco>
<!-- use Runge-Kutta for better energy conservation -->
<option integrator="RK4">
<flag energy="enable"/>
</option>
<statistic center="0 0 0"/>
<worldbody>
<site name="origin" size=".01" rgba="1 0 0 1"/>
<light pos="0 0 3"/>
<body pos="1 0 .06">
<joint type="slide" axis="1 0 0"/>
<geom size=".05"/>
<site name="attachment" size=".01" pos="0 0 -.06" rgba="1 0 0 1"/>
</body>
</worldbody>
<tendon>
<spatial name="tendon" stiffness="10" springlength="0 .5">
<site site="origin"/>
<site site="attachment"/>
</spatial>
</tendon>
<sensor>
<tendonpos tendon="tendon"/>
</sensor>
</mujoco>