Skip to content

Commit bd7cd1b

Browse files
JuanaDdiakinola23
andauthored
Adds visual-based tactile sensor with shape sensing example (#3420)
# Description This is an implementation of TacSL integrated with Isaac Lab, which demonstrates how to properly configure and use tactile sensors to obtain realistic sensor outputs including tactile RGB images, force fields, and other relevant tactile measurements. ## Type of change - New feature (non-breaking change which adds functionality) ## Screenshots The screenshots of added documentation and simulation outputs. <img width="1121" height="878" alt="image" src="https://github.com/user-attachments/assets/5772a87b-474c-4a6c-87f5-b65aab102259" /> <img width="1311" height="669" alt="image" src="https://github.com/user-attachments/assets/8c2d4e66-2c12-4724-b6fd-8180f2fe9960" /> <img width="765" height="281" alt="image" src="https://github.com/user-attachments/assets/ad0e0899-7e3c-429f-9848-700d9310ae1b" /> ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Juana <yvetted@nvidia.com> Co-authored-by: iakinola23 <147214266+iakinola23@users.noreply.github.com>
1 parent 955d110 commit bd7cd1b

File tree

27 files changed

+2954
-3
lines changed

27 files changed

+2954
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,7 @@ tests/
6969

7070
# Docker history
7171
.isaac-lab-docker-history
72+
73+
# TacSL sensor
74+
**/tactile_record/*
75+
**/gelsight_r15_data/*

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Guidelines for modifications:
9090
* Jinqi Wei
9191
* Jinyeob Kim
9292
* Johnson Sun
93+
* Juana Du
9394
* Kaixi Bao
9495
* Kris Wilson
9596
* Krishna Lakhi

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@
191191
"nvidia.srl",
192192
"flatdict",
193193
"IPython",
194+
"cv2",
195+
"imageio",
194196
"ipywidgets",
195197
"mpl_toolkits",
196198
]
96.6 KB
Loading
101 KB
Loading
234 KB
Loading
17.6 KB
Loading

docs/source/api/lab/isaaclab.sensors.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
MultiMeshRayCasterCameraCfg
3939
Imu
4040
ImuCfg
41+
VisuoTactileSensor
42+
VisuoTactileSensorCfg
43+
VisuoTactileSensorData
4144

4245
Sensor Base
4346
-----------
@@ -204,3 +207,22 @@ Inertia Measurement Unit
204207
:inherited-members:
205208
:show-inheritance:
206209
:exclude-members: __init__, class_type
210+
211+
Visuo-Tactile Sensor
212+
--------------------
213+
214+
.. autoclass:: VisuoTactileSensor
215+
:members:
216+
:inherited-members:
217+
:show-inheritance:
218+
219+
.. autoclass:: VisuoTactileSensorData
220+
:members:
221+
:inherited-members:
222+
:exclude-members: __init__
223+
224+
.. autoclass:: VisuoTactileSensorCfg
225+
:members:
226+
:inherited-members:
227+
:show-inheritance:
228+
:exclude-members: __init__, class_type

docs/source/overview/core-concepts/sensors/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ The following pages describe the available sensors in more detail:
1919
frame_transformer
2020
imu
2121
ray_caster
22+
visuo_tactile_sensor
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
.. _overview_sensors_tactile:
2+
3+
.. currentmodule:: isaaclab
4+
5+
Visuo-Tactile Sensor
6+
====================
7+
8+
9+
The visuo-tactile sensor in Isaac Lab provides realistic tactile feedback through integration with TacSL (Tactile Sensor Learning) [Akinola2025]_. It is designed to simulate high-fidelity tactile interactions, generating both visual and force-based data that mirror real-world tactile sensors like GelSight devices. The sensor can provide tactile RGB images, force field distributions, and other intermediate tactile measurements essential for robotic manipulation tasks requiring fine tactile feedback.
10+
11+
12+
.. figure:: ../../../_static/overview/sensors/tacsl_diagram.jpg
13+
:align: center
14+
:figwidth: 100%
15+
:alt: Tactile sensor with RGB visualization and force fields
16+
17+
18+
Configuration
19+
~~~~~~~~~~~~~
20+
21+
Tactile sensors require specific configuration parameters to define their behavior and data collection properties. The sensor can be configured with various parameters including sensor resolution, force sensitivity, and output data types.
22+
23+
.. code-block:: python
24+
25+
from isaaclab.sensors.tacsl_sensor import VisuoTactileSensorCfg
26+
from isaaclab.sensors import TiledCameraCfg
27+
from isaaclab_assets.sensors import GELSIGHT_R15_CFG
28+
import isaaclab.sim as sim_utils
29+
30+
# Tactile sensor configuration
31+
tactile_sensor = VisuoTactileSensorCfg(
32+
prim_path="{ENV_REGEX_NS}/Robot/elastomer/tactile_sensor",
33+
## Sensor configuration
34+
render_cfg=GELSIGHT_R15_CFG,
35+
enable_camera_tactile=True,
36+
enable_force_field=True,
37+
## Elastomer configuration
38+
tactile_array_size=(20, 25),
39+
tactile_margin=0.003,
40+
## Contact object configuration
41+
contact_object_prim_path_expr="{ENV_REGEX_NS}/contact_object",
42+
## Force field physics parameters
43+
normal_contact_stiffness=1.0,
44+
friction_coefficient=2.0,
45+
tangential_stiffness=0.1,
46+
## Camera configuration
47+
camera_cfg=TiledCameraCfg(
48+
prim_path="{ENV_REGEX_NS}/Robot/elastomer_tip/cam",
49+
update_period=1 / 60, # 60 Hz
50+
height=320,
51+
width=240,
52+
data_types=["distance_to_image_plane"],
53+
spawn=None, # camera already spawned in USD file
54+
),
55+
)
56+
57+
The configuration supports customization of:
58+
59+
* **Render Configuration**: Specify the GelSight sensor rendering parameters using predefined configs
60+
(e.g., ``GELSIGHT_R15_CFG``, ``GELSIGHT_MINI_CFG`` from ``isaaclab_assets.sensors``)
61+
* **Tactile Modalities**:
62+
* ``enable_camera_tactile`` - Enable tactile RGB imaging through camera sensors
63+
* ``enable_force_field`` - Enable force field computation and visualization
64+
* **Force Field Grid**: Set tactile grid dimensions (``tactile_array_size``) and margins, which directly affects the spatial resolution of the computed force field
65+
* **Contact Object Configuration**: Define properties of interacting objects using prim path expressions to locate objects with SDF collision meshes
66+
* **Physics Parameters**: Control the sensor's force field computation:
67+
* ``normal_contact_stiffness``, ``friction_coefficient``, ``tangential_stiffness`` - Normal stiffness, friction coefficient, and tangential stiffness
68+
* **Camera Settings**: Configure resolution, update rates, and data types, currently only ``distance_to_image_plane`` (alias for ``depth``) is supported.
69+
``spawn`` is set to ``None`` by default, which means that the camera is already spawned in the USD file.
70+
If you want to spawn the camera yourself and set focal length, etc., you can set the spawn configuration to a valid spawn configuration.
71+
72+
Configuration Requirements
73+
~~~~~~~~~~~~~~~~~~~~~~~~~~
74+
75+
.. important::
76+
The following requirements must be satisfied for proper sensor operation:
77+
78+
**Camera Tactile Imaging**
79+
If ``enable_camera_tactile=True``, a valid ``camera_cfg`` (TiledCameraCfg) must be provided with appropriate camera parameters.
80+
81+
**Force Field Computation**
82+
If ``enable_force_field=True``, the following parameters are required:
83+
84+
* ``contact_object_prim_path_expr`` - Prim path expression to locate contact objects with SDF collision meshes
85+
86+
**SDF Computation**
87+
When force field computation is enabled, penalty-based normal and shear forces are computed using Signed Distance Field (SDF) queries. To achieve GPU acceleration:
88+
89+
* Interacting objects should have SDF collision meshes
90+
* An SDFView must be defined during initialization, therefore interacting objects should be specified before simulation.
91+
92+
**Elastomer Configuration**
93+
The sensor's ``prim_path`` must be configured as a child of the elastomer prim in the USD hierarchy.
94+
The query points for the force field computation is computed from the surface of the elastomer mesh, which is searched for under the prim path of the elastomer.
95+
96+
**Physics Materials**
97+
The sensor uses physics materials to configure the compliant contact properties of the elastomer.
98+
By default, physics material properties are pre-configured in the USD asset. However, you can override
99+
these properties by specifying the following parameters in ``UsdFileWithCompliantContactCfg`` when
100+
spawning the robot:
101+
102+
* ``compliant_contact_stiffness`` - Contact stiffness for the elastomer surface
103+
* ``compliant_contact_damping`` - Contact damping for the elastomer surface
104+
* ``physics_material_prim_path`` - Prim path where physics material is applied (typically ``"elastomer"``)
105+
106+
If any parameter is set to ``None``, the corresponding property from the USD asset will be retained.
107+
108+
109+
Usage Example
110+
~~~~~~~~~~~~~
111+
112+
To use the tactile sensor in a simulation environment, run the demo:
113+
114+
.. code-block:: bash
115+
116+
cd scripts/demos/sensors
117+
python tacsl_sensor.py --use_tactile_rgb --use_tactile_ff --tactile_compliance_stiffness 100.0 --tactile_compliant_damping 1.0 --contact_object_type nut --num_envs 16 --save_viz --enable_cameras
118+
119+
Available command-line options include:
120+
121+
* ``--use_tactile_rgb``: Enable camera-based tactile sensing
122+
* ``--use_tactile_ff``: Enable force field tactile sensing
123+
* ``--contact_object_type``: Specify the type of contact object (nut, cube, etc.)
124+
* ``--num_envs``: Number of parallel environments
125+
* ``--save_viz``: Save visualization outputs for analysis
126+
* ``--tactile_compliance_stiffness``: Override compliant contact stiffness (default: use USD asset values)
127+
* ``--tactile_compliant_damping``: Override compliant contact damping (default: use USD asset values)
128+
* ``--normal_contact_stiffness``: Normal contact stiffness for force field computation
129+
* ``--tangential_stiffness``: Tangential stiffness for shear forces
130+
* ``--friction_coefficient``: Friction coefficient for shear forces
131+
* ``--debug_sdf_closest_pts``: Visualize closest SDF points for debugging
132+
* ``--debug_tactile_sensor_pts``: Visualize tactile sensor points for debugging
133+
* ``--trimesh_vis_tactile_points``: Enable trimesh-based visualization of tactile points
134+
135+
For a complete list of available options:
136+
137+
.. code-block:: bash
138+
139+
python tacsl_sensor.py -h
140+
141+
.. note::
142+
The demo examples are based on the Gelsight R1.5, which is a prototype sensor that is now discontinued. The same procedure can be adapted for other visuotactile sensors.
143+
144+
.. figure:: ../../../_static/overview/sensors/tacsl_demo.jpg
145+
:align: center
146+
:figwidth: 100%
147+
:alt: TacSL tactile sensor demo showing RGB tactile images and force field visualizations
148+
149+
The tactile sensor supports multiple data modalities that provide comprehensive information about contact interactions:
150+
151+
152+
Output Tactile Data
153+
~~~~~~~~~~~~~~~~~~~
154+
**RGB Tactile Images**
155+
Real-time generation of tactile RGB images as objects make contact with the sensor surface. These images show deformation patterns and contact geometry similar to gel-based tactile sensors [Si2022]_
156+
157+
158+
**Force Fields**
159+
Detailed contact force field and pressure distributions across the sensor surface, including normal and shear components.
160+
161+
.. list-table::
162+
:widths: 50 50
163+
:class: borderless
164+
165+
* - .. figure:: ../../../_static/overview/sensors/tacsl_taxim_example.jpg
166+
:align: center
167+
:figwidth: 80%
168+
:alt: Tactile output with RGB visualization
169+
170+
- .. figure:: ../../../_static/overview/sensors/tacsl_force_field_example.jpg
171+
:align: center
172+
:figwidth: 80%
173+
:alt: Tactile output with force field visualization
174+
175+
Integration with Learning Frameworks
176+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177+
178+
The tactile sensor is designed to integrate seamlessly with reinforcement learning and imitation learning frameworks. The structured tensor outputs can be directly used as observations in learning algorithms:
179+
180+
.. code-block:: python
181+
182+
def get_tactile_observations(self):
183+
"""Extract tactile observations for learning."""
184+
tactile_data = self.scene["tactile_sensor"].data
185+
186+
# tactile RGB image
187+
tactile_rgb = tactile_data.tactile_rgb_image
188+
189+
# tactile depth image
190+
tactile_depth = tactile_data.tactile_depth_image
191+
192+
# force field
193+
tactile_normal_force = tactile_data.tactile_normal_force
194+
tactile_shear_force = tactile_data.tactile_shear_force
195+
196+
return [tactile_rgb, tactile_depth, tactile_normal_force, tactile_shear_force]
197+
198+
199+
200+
References
201+
~~~~~~~~~~
202+
203+
.. [Akinola2025] Akinola, I., Xu, J., Carius, J., Fox, D., & Narang, Y. (2025). TacSL: A library for visuotactile sensor simulation and learning. *IEEE Transactions on Robotics*.
204+
.. [Si2022] Si, Z., & Yuan, W. (2022). Taxim: An example-based simulation model for GelSight tactile sensors. *IEEE Robotics and Automation Letters*, 7(2), 2361-2368.

0 commit comments

Comments
 (0)