Add circle to flexcomp and remove rope and loop from composite.

Add pulley example to show a circle use case.

Switch on flex edge rendering by default (no effect when flex skin is rendered).

PiperOrigin-RevId: 700738379
Change-Id: I8469bbf194de01c8dab66c9a51c49879013df141
This commit is contained in:
Alessio Quaglino
2024-11-27 10:13:28 -08:00
committed by Copybara-Service
parent 85c6fc1bdb
commit 300450f8b8
9 changed files with 98 additions and 198 deletions
+51
View File
@@ -0,0 +1,51 @@
<!-- Copyright 2021 DeepMind Technologies Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<mujoco model="Pulley">
<include file="scene.xml"/>
<option>
<flag gravity="disable"/>
</option>
<statistic center="0 -.3 1" extent="2.5"/>
<worldbody>
<flexcomp name="cable" type="circle" count="40 1 1" spacing=".15 1 1" dim="1"
radius="0.02" pos="0 0 1" rgba="1 0 0 1">
<edge equality="true"/>
</flexcomp>
<body name="left" pos="-.7 0 1">
<joint name="expand_left" type="slide" axis="-1 0 0" range="0 2" damping="20"/>
<joint name="rotate" type="hinge" axis="0 0 1"/>
<geom type="cylinder" size=".2 .2" density="1"/>
</body>
<body name="right" pos=".7 0 1">
<joint name="expand_right" type="slide" axis="1 0 0" range="0 2" damping="20"/>
<joint type="hinge" axis="0 0 1"/>
<geom type="cylinder" size=".2 .2" density="1"/>
</body>
</worldbody>
<actuator>
<position name="expand_left" joint="expand_left" ctrlrange="0 2" kp="100"/>
<position name="expand_right" joint="expand_right" ctrlrange="0 2" kp="100"/>
<velocity name="rotate" joint="rotate" ctrlrange="0 8"/>
</actuator>
<keyframe>
<key ctrl=".7 .7 8"/>
</keyframe>
</mujoco>