Adds support for fixed tendons to MJX.

PiperOrigin-RevId: 654816559
Change-Id: I16ab379b0dc96d62a530e1c3ccd98a76b78c7f5a
This commit is contained in:
Erik Frey
2024-07-22 10:47:57 -07:00
committed by Copybara-Service
parent 33e5960653
commit 2d24c58819
15 changed files with 229 additions and 68 deletions
+12
View File
@@ -64,10 +64,22 @@
</body>
</worldbody>
<tendon>
<fixed name="tendon_1" limited="true" range="-0.3 0.1" stiffness=".1" damping=".2">
<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="connect" body1="anchor1" body2="beam1" anchor="1 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>
+12
View File
@@ -126,6 +126,17 @@
</body>
</worldbody>
<tendon>
<fixed name="tendon_1" limited="true" range="-0.3 0.1" stiffness=".1" damping=".2">
<joint joint="joint2" coef=".1"/>
<joint joint="joint3" coef="-.2"/>
</fixed>
<fixed name="tendon_2" limited="true" range="-0.3 2" springlength="0 0.05" stiffness=".3" damping=".4">
<joint joint="joint4" coef=".3"/>
<joint joint="joint5" coef="-.4"/>
</fixed>
</tendon>
<actuator>
<motor gear="250 0 0" joint="joint1" name="act1"/>
<motor gear="0 275 0" joint="joint1" name="act2"/>
@@ -135,5 +146,6 @@
<motor gear="150" joint="joint15" name="act6"/>
<motor gear="150" joint="joint16" name="act7"/>
<motor gear="150" joint="joint17" name="act8"/>
<position tendon="tendon_2" kp="100"/>
</actuator>
</mujoco>