|
| 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