Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tactile/code/assets/CoppeliaSim scene.ttt
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_4.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_J1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_J2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Annular_J3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_4.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_J1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_J2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Index_J3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/J1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/J2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/J3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_4.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_J1.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_J2.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Middle_J3.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Palm.stl
Binary file not shown.
Binary file added tactile/code/assets/Index_bones/Pinky_1.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Pinky_2.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Pinky_3.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Pinky_4.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Pinky_J1.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Pinky_J2.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Pinky_J3.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Thumb_1.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Thumb_2.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Thumb_3.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Thumb_J1.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Thumb_J2.stl
Diff not rendered.
Binary file added tactile/code/assets/Index_bones/Thumb_J3.stl
Diff not rendered.
802 changes: 802 additions & 0 deletions tactile/code/assets/MuJoCo hands and phantom.xml

Large diffs are not rendered by default.

784 changes: 784 additions & 0 deletions tactile/code/assets/MuJoCo hands.xml

Large diffs are not rendered by default.

272 changes: 272 additions & 0 deletions tactile/code/assets/MuJoCo phantom.xml

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions tactile/code/assets/MuJoCo scene simple.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml-model href="../../mujoco-xml-schema-mjcf/mujoco.xsd"?>
<mujoco>
<statistic extent="1.5" meansize=".05" />

<option solver="CG" tolerance="1e-6" timestep=".001" integrator="implicitfast" jacobian="sparse">
<!-- <flag gravity="disable" /> -->
</option>

<size memory="10M" />

<visual>
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<map stiffness="100" shadowscale="0.5" fogstart="10" fogend="15" zfar="40" haze="0.3" />
</visual>

<!-- 注意:MuJoCo 3.x 不需要显式声明弹性体插件 -->

<asset>
<texture type="skybox" builtin="gradient" rgb1="1 0.5 0.7" rgb2="0 0 0" width="512"
height="512" />
<texture name="texplane" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".1 0.15 0.2"
width="512" height="512" mark="cross" markrgb=".8 .8 .8" />

<material name="matplane" reflectance="0.3" texture="texplane" texrepeat="1 1"
texuniform="true" />
</asset>

<worldbody>
<body name="right_hand_mocap" mocap="true" pos="0 0 0.2" euler="0 0 0">
<geom type="capsule" size="0.03 0.06" />
</body>

<light directional="true" diffuse=".4 .4 .4" specular="0.1 0.1 0.1" pos="0 0 5.0"
dir="0 0 -1" castshadow="false" />
<light directional="true" diffuse=".6 .6 .6" specular="0.2 0.2 0.2" pos="0 0 4" dir="0 0 -1" />

<geom name="ground" type="plane" size="0 0 1" pos="0 0 0" quat="1 0 0 0" material="matplane"
condim="1" />

<body name="finger" mocap="true" pos="0 0 0.1" euler="90 0 0">
<geom type="capsule" size="0.01115 0.036" />
<site name="fingertip" type="sphere" pos="0.0 -0.008 -0.035" rgba="0.5 0.5 1 1" />
</body>

<flexcomp type="grid" count="5 5 5" spacing=".02 .02 .02" pos="0 0 0.045" dim="3"
radius=".005" rgba="0 .7 .7 1" mass="5" name="softbody">
<pin gridrange="0 0 0 4 4 0"/>
<contact condim="3" solref="0.01 1" solimp=".95 .99 .0001" selfcollide="none" />

</flexcomp>
</worldbody>

<sensor>
<touch site="fingertip" name="fingertip_sensor" />
</sensor>

</mujoco>
161 changes: 161 additions & 0 deletions tactile/code/assets/balloons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<?xml-model href="../../mujoco-xml-schema-mjcf/mujoco.xsd"?>
<mujoco>
<statistic extent="1.5" meansize=".05" />

<option density="1.204" viscosity="1.8e-5" timestep=".001" integrator="implicitfast"
solver="CG" tolerance="1e-6" jacobian="sparse" />

<visual>
<rgba haze="0.15 0.25 0.35 1" fog="0.5 0.8 0.5 0.5"/>
<quality shadowsize="4096" />
<map stiffness="100" shadowscale="0.5" fogstart="10" fogend="15" zfar="40" haze="0.3" />
</visual>

<size memory="10M" />

<extension>
<plugin plugin="mujoco.elasticity.solid" />
</extension>

<default>
<tendon limited="true" width="0.003" rgba="1 1 1 1"/>
<geom friction=".2"/>
<default class="weight">
<geom rgba=".8 .4 .8 1"/>
<site rgba=".8 .4 .8 1"/>
</default>
<default class="balloon">
<!--
0.167 is the MKS density of helium at room temperature.
Note this does not take into account the mass of the rubber,
which is likely not insignificant.
-->
<geom density="0.167" fluidshape="ellipsoid"/>
<default class="pink">
<geom rgba="1 .6 .7 1"/>
<site rgba="1 .6 .7 1"/>
</default>
<default class="blue">
<geom rgba=".3 .7 .9 1"/>
<site rgba=".3 .7 .9 1"/>
</default>
<default class="green">
<geom rgba=".4 .9 .5 1"/>
<site rgba=".4 .9 .5 1"/>
</default>
<default class="orange">
<geom rgba="1 .4 0 1"/>
<site rgba="1 .4 0 1"/>
</default>
</default>
</default>

<asset>
<texture type="skybox" builtin="gradient" rgb1="0.529 0.808 0.922" rgb2="0 0 0" width="512"
height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512"
rgb2="0.127 0.731 0.141 " rgb1="0.484 0.984 0.0" mark="edge"/>
<material name="grid" texture="grid" texrepeat="2 2" texuniform="true"
reflectance="0" rgba=".5 .5 .5 1"/>

<mesh file="Hand_Decomposed.obj" scale=".2 .2 .2" />
</asset>

<worldbody>
<light directional="true" diffuse=".4 .4 .4" specular="0.1 0.1 0.1" pos="0 0 5.0"
dir="0 0 -1" castshadow="false" />
<light directional="true" diffuse=".6 .6 .6" specular="0.2 0.2 0.2" pos="0 0 4" dir="0 0 -1" />

<flexcomp type="grid" count="6 6 6" spacing=".06 .06 .06" pos="0 0.8 -.25" dim="3"
radius=".005" rgba="0 .7 .7 1" mass="5" name="softbody">
<edge damping="1"/>
<!-- <pin gridrange="0 0 0 4 4 0"/> -->
<contact selfcollide="none" />
<plugin plugin="mujoco.elasticity.solid">
<config key="poisson" value="0" />
<config key="young" value="5e4" />
</plugin>
</flexcomp>

<body name="finger" mocap="true" pos="2 0 1" euler="90 0 0">
<geom type="capsule" size="0.01115 0.036" />
</body>
<frame name="right_hand_frame" pos="0 0 1">
<body name="right_hand_mocap" mocap="true">
<geom type="box" size="0.02 0.05 0.05" rgba=".5 .5 .5 .3" contype="0" conaffinity="0"/>
<site name="fingertip" type="sphere" pos="0.0 -0.03 -0.055" rgba="0.5 0.5 1 1" />
</body>
<body name="right_hand_collision">
<freejoint/>
<geom type="mesh" mesh="Hand_Decomposed" euler="180 0 0"/>
</body>
</frame>

<geom name="ground" type="plane" size="5 5 .05" pos="0 0 -.5" material="grid"/>
<geom name="ramp" type="box" size=".4 .2 .03" pos="0 0 -.4" euler="0 20 0" rgba="1 1 1 1"/>

<body name="weight" childclass="weight" pos=".3 0 .2">
<freejoint/>
<!-- The mass of the weight was chosen to be slightly bigger than the total buoyancy of the balloons. -->
<geom name="weight" type="box" size=".015 .015 .015" mass=".0347"/>
<site name="weight1" pos=" .013 .013 .013" size="0.005"/>
<site name="weight2" pos="-.013 -.013 .013" size="0.005"/>
</body>

<!-- The gravcomp value of 7.2 is the ratio of air and helium desities at room temperature. -->
<body name="pink" gravcomp="7.2" pos="-.2 .1 .2" childclass="pink">
<freejoint />
<geom name="pink" type="ellipsoid" size=".11 .11 .15"/>
<geom name="pink_knot" pos="0 0 -.15" size=".02"/>
<site name="pink" pos="0 0 -.17" size="0.01"/>
</body>

<body name="blue" gravcomp="7.2" pos=".1 .1 .2" childclass="blue">
<freejoint />
<geom name="blue" type="ellipsoid" size=".12 .12 .15"/>
<geom name="blue_knot" pos="0 0 -.15" size=".02"/>
<site name="blue" pos="0 0 -.17" size="0.01"/>
</body>

<body name="green" gravcomp="7.2" pos=".1 -.1 .2" childclass="green">
<freejoint />
<geom name="green" type="ellipsoid" size=".12 .12 .14"/>
<geom name="green_knot" pos="0 0 -.14" size=".02"/>
<site name="green" pos="0 0 -.16" size="0.01"/>
</body>

<body name="orange" gravcomp="7.2" pos="-.12 -.12 .2" childclass="orange">
<freejoint />
<geom name="orange" type="ellipsoid" size=".12 .12 .13"/>
<geom name="orange_knot" pos="0 0 -.13" size=".02"/>
<site name="orange" pos="0 0 -.15" size="0.01"/>
</body>
</worldbody>

<equality>
<weld body1="right_hand_mocap" body2="right_hand_collision"/>
</equality>

<tendon>
<spatial range="0 0.6">
<site site="pink"/>
<site site="weight1"/>
</spatial>
<spatial range="0 0.4">
<site site="blue"/>
<site site="weight1"/>
</spatial>
<spatial range="0 0.3">
<site site="green"/>
<site site="weight2"/>
</spatial>
<spatial range="0 0.5">
<site site="orange"/>
<site site="weight2"/>
</spatial>
</tendon>

<sensor>
<touch site="fingertip" name="fingertip_sensor" />
</sensor>
</mujoco>
Binary file added tactile/code/assets/cover.png
73 changes: 73 additions & 0 deletions tactile/code/assets/deformable_cloth.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<mujoco model="deformable_cloth">
<!--
可变形布料场景
用于测试柔性织物材质的触觉反馈
-->

<compiler angle="radian" meshdir="." autolimits="true"/>

<option timestep="0.001" iterations="50" solver="Newton" gravity="0 0 -9.81">
<flag warmstart="enable"/>
</option>

<size memory="100M"/>

<visual>
<global offwidth="1920" offheight="1080"/>
<quality shadowsize="4096" offsamples="8"/>
</visual>

<asset>
<!-- 布料材质 - 柔性织物 -->
<texture name="cloth_texture" type="2d" builtin="checker" width="512" height="512"
rgb1="0.8 0.3 0.3" rgb2="0.6 0.2 0.2"/>
<material name="cloth_material" texture="cloth_texture" rgba="0.8 0.3 0.3 1"
specular="0.1" shininess="0.1"/>

<!-- 地面材质 -->
<texture name="grid" type="2d" builtin="checker" width="512" height="512"
rgb1="0.9 0.9 0.9" rgb2="0.7 0.7 0.7"/>
<material name="grid_material" texture="grid" texrepeat="8 8" reflectance="0.1"/>
</asset>

<worldbody>
<!-- 地面 -->
<geom name="floor" type="plane" size="2 2 0.1" material="grid_material"/>

<!-- 灯光 -->
<light directional="true" diffuse="0.8 0.8 0.8" specular="0.3 0.3 0.3" pos="0 0 3" dir="0 0 -1"/>
<light directional="true" diffuse="0.4 0.4 0.4" specular="0.1 0.1 0.1" pos="2 2 2" dir="-1 -1 -1"/>

<!-- 可变形布料 - 使用flex (2D网格),固定四角 -->
<flexcomp name="cloth_sheet" type="grid" count="15 15 1" spacing="0.02 0.02 0.02"
pos="0 0 1.0" radius="0.005" rgba="0.8 0.3 0.3 1"
mass="0.2" dim="2">
<contact friction="0.8" solimp="0.9 0.95 0.001" solref="0.01 1"/>
<edge equality="true" damping="5"/>
<!-- 固定四个角: 顶点索引 0, 14, 210, 224 -->
<pin id="0"/>
<pin id="14"/>
<pin id="210"/>
<pin id="224"/>
</flexcomp>

<!-- 探针 -->
<body name="probe" pos="0 0 1.3">
<freejoint name="probe_joint"/>
<geom name="probe_geom" type="sphere" size="0.015" rgba="0.2 0.6 1 1" mass="0.05"/>
<site name="probe_tip" pos="0 0 -0.015" size="0.01"/>
</body>

</worldbody>

<actuator>
<motor name="probe_x" joint="probe_joint" gear="1 0 0 0 0 0" ctrlrange="-1 1"/>
<motor name="probe_y" joint="probe_joint" gear="0 1 0 0 0 0" ctrlrange="-1 1"/>
<motor name="probe_z" joint="probe_joint" gear="0 0 1 0 0 0" ctrlrange="-1 1"/>
</actuator>

<sensor>
<force name="probe_contact_force" site="probe_tip"/>
</sensor>

</mujoco>
71 changes: 71 additions & 0 deletions tactile/code/assets/deformable_jelly_cube.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<mujoco model="deformable_jelly_cube">
<!--
可变形果冻立方体场景
用于测试软体弹性材质的触觉反馈

作者: [你的名字]
日期: 2025
-->

<compiler angle="radian" meshdir="." autolimits="true"/>

<option timestep="0.001" iterations="50" solver="Newton" gravity="0 0 -9.81">
<flag warmstart="enable"/>
</option>

<size memory="100M"/>

<visual>
<global offwidth="1920" offheight="1080"/>
<quality shadowsize="4096" offsamples="8"/>
</visual>

<asset>
<!-- 果冻材质 - 软体弹性 -->
<texture name="jelly_texture" type="cube" builtin="flat" rgb1="1 0.5 0.8" rgb2="1 0.7 0.9" width="512" height="512"/>
<material name="jelly_material" texture="jelly_texture" rgba="1 0.5 0.8 0.9" specular="0.5" shininess="0.8"/>

<!-- 地面材质 -->
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1="0.9 0.9 0.9" rgb2="0.7 0.7 0.7"/>
<material name="grid_material" texture="grid" texrepeat="8 8" reflectance="0.1"/>
</asset>

<worldbody>
<!-- 地面 -->
<geom name="floor" type="plane" size="2 2 0.1" material="grid_material"/>

<!-- 灯光 -->
<light directional="true" diffuse="0.8 0.8 0.8" specular="0.3 0.3 0.3" pos="0 0 3" dir="0 0 -1"/>
<light directional="true" diffuse="0.4 0.4 0.4" specular="0.1 0.1 0.1" pos="2 2 2" dir="-1 -1 -1"/>

<!-- 可变形果冻立方体 - 使用flex (软体) -->
<flexcomp name="jelly_cube" type="grid" count="8 8 8" spacing="0.03 0.03 0.03"
pos="0 0 0.5" radius="0.01" rgba="1 0.5 0.8 1"
mass="0.5" dim="3">
<contact friction="0.5" solimp="0.9 0.95 0.001" solref="0.01 1"/>
<edge equality="true" damping="10"/>
</flexcomp>

<!-- 简单的探针/手指代替物 -->
<body name="probe" pos="0 0 1.5">
<freejoint name="probe_joint"/>
<geom name="probe_geom" type="sphere" size="0.02" rgba="0.2 0.6 1 1" mass="0.1"/>
<site name="probe_tip" pos="0 0 -0.02" size="0.01"/>
</body>

</worldbody>

<actuator>
<!-- 探针的控制器 -->
<motor name="probe_x" joint="probe_joint" gear="1 0 0 0 0 0" ctrlrange="-1 1"/>
<motor name="probe_y" joint="probe_joint" gear="0 1 0 0 0 0" ctrlrange="-1 1"/>
<motor name="probe_z" joint="probe_joint" gear="0 0 1 0 0 0" ctrlrange="-1 1"/>
</actuator>

<sensor>
<!-- 接触力传感器 -->
<force name="probe_contact_force" site="probe_tip"/>
<accelerometer name="probe_accel" site="probe_tip"/>
</sensor>

</mujoco>
Loading