Skip to content

Conversation

@JuanaDd
Copy link
Contributor

@JuanaDd JuanaDd commented Sep 10, 2025

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.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

The screenshots of added documentation and simulation outputs.
image
image
image

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

clean up license and configs; use full import path;

add doc for visuo_tactile_sensor
References
~~~~~~~~~~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iakinola23 Could you help view this documentation here? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iakinola23 updated the documentation with your edits.

Copy link
Contributor Author

@JuanaDd JuanaDd Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kellyguo11 Hi Kelly, I will upload the npz binaries, and the USD files to nucleus once the licensing concerns are resolved. Thanks!

@Mayankm96 Mayankm96 changed the title visual-based tactile sensor impl. and shape sensing example Adds visual-based tactile sensor with shape sensing example Sep 10, 2025
@Mayankm96 Mayankm96 added the enhancement New feature or request label Sep 10, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 11, 2025
Copy link
Contributor

@kellyguo11 kellyguo11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few high-level comments, haven't gone through the code in detail yet

taxim_gelsight = gelsightRender("gelsight_r15")
import ipdb

ipdb.set_trace()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a breakpoint here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted in the newest commit.

self._camera_sensor = TiledCamera(self.cfg.camera_cfg)

# Initialize camera if not already done
# TODO: Juana: this is a hack to initialize the camera sensor. Should camera_sensor be managed by TacSL sensor or InteractiveScene?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can do something similar as the Raycaster camera?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Kelly, I checked the RayCasterCamera implementation, and it differs slightly from the tacsl sensor logic. The tacsl_sensor includes a camera sensor that can be enabled or disabled via the cfg, while RayCasterCamera only uses CameraData without having a camera or other sensor as a member. I’ve kept the current implementation and cleaned up the comments. Please let me know if you have any further concerns or suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

images should be .jpg

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all changed to jpg format and documentation is updated accordingly.

.. code-block:: bash
conda activate env_isaaclab
pip install opencv-python==4.11.0 trimesh==4.5.1 imageio==2.37.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to add these to setup.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added opencv-python to setup.py; trimesh is already included, and imageio's dependency is not required in the newest commit.

license agreement from NVIDIA CORPORATION is strictly prohibited.
----------------
Tensorized implementation of RGB rendering of gelsight-style visuo-tactile sensors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add any licenses required for gelsight under docs/licenses?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the license header to be consistent with other files.

@kellyguo11
Copy link
Contributor

please also make sure to run ./isaaclab.sh -f for the linter checks

return dzdx, dzdy


def generate_normals(height_map):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generate_normals not needed and deprecated. only the tensorized version is used.

self.background_tensor = torch.tensor(self.background, device=self.device)
print("Gelsight initialization done!")

def render(self, heightMap):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete render as it is not used. Only the tensorized version (render_tensorized ) is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted render , generate_normals, and compute_image_gradient , padding as well.

@zxhuang97
Copy link

zxhuang97 commented Sep 30, 2025

Thank you for making TacSL available on IsaacLab! I have three quick questions:

  1. Have you evaluated the physical plausibility of the GelSight finger? For example, would it allow stable grasps of objects like pegs or bolts, similar to what TacSL demonstrated in Isaac Gym?
  2. I noticed that only the USD for gelsight_r15 is currently available. Do you plan to migrate gelsight_mini as well? Alternatively, could you share guidance on converting the URDF to USD while preserving realistic physics?
  3. Is there a way to change the resolution of the tactile image? Currently it's hard-coded in configuration to be 320 x 240

Thanks!

@Mayankm96 Mayankm96 moved this to In review in Isaac Lab Oct 10, 2025
@kellyguo11
Copy link
Contributor

@ooctipus @Mayankm96 could you please help do a review of this one?

@JuanaDd
Copy link
Contributor Author

JuanaDd commented Oct 18, 2025

@zxhuang97 Hi, thanks for your questions and for checking out TacSL on IsaacLab.

  1. Yes. A full task environment (like object grasping) will be supported later after this PR. This PR mainly serves as a reference for how to implement a custom visual-based sensor in the IsaacLab framework.

  2. The GelSight Mini will likely be supported later, as long as there aren’t any license issues. In the meantime, you can try using the URDF importer tool in IsaacSim or the convert_urdf.py script in IsaacLab to convert it yourself. You can tweak the physical properties — such as compliance_stiffness and compliant_damping — in the tacsl sensor config if needed.

  3. The tactile image resolution can be modified through the camera config. Right now, it’s using the values defined in the camera prim included in the asset.

Hope this helps!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only this diagram seems to be getting used. Please remove any unused images.

Comment on lines 15 to 34
conf_r15 = {
"data_dir": "gelsight_r15_data",
"background_path": "bg.jpg",
"calib_path": "polycalib.npz",
"real_bg": "real_bg.npy",
"h": 320,
"w": 240,
"numBins": 120,
"pixmm": 0.0877,
}
conf_gs_mini = {
"data_dir": "gs_mini_data",
"background_path": "bg.jpg",
"calib_path": "polycalib.npz",
"real_bg": "real_bg.npy",
"h": 240,
"w": 320,
"numBins": 120,
"pixmm": 0.065,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following all other sensors, please make these into configclass objects with the correct doc-strings. We usually don't want to keep sensor-specific settings in the core codebase.

Sensors configuration live here: https://github.com/isaac-sim/IsaacLab/tree/main/source/isaaclab_assets/isaaclab_assets/sensors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please choose variable names that are intuitive to read and understand. "h" and "w" are insufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. A Config class has been added here and gelsight configs are put under isaaclab_asets/sensors

tactile_margin: float = 0.003
"""Margin for tactile point generation (in meters)."""

contact_object_prim_path_expr: str | None = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear here what contact object means. How is this different from the prim_path that gets set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter functions similarly to the filter_prim_paths_expr parameter in ContactSensor, helping pre-configure the SDF query in the tacsl sensor simulation. See the doc here

"""

# Force field physics parameters
tactile_kn: float = 1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend using more understandable names like normal_contact_stiffness to make it clear from the variable name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to more understandable names for the three params in here

camera_cfg: TiledCameraCfg | None = None
"""Camera configuration for tactile RGB/depth sensing.
If None, camera-based sensing will be disabled even if enable_camera_tactile is True.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If None, camera-based sensing will be disabled even if enable_camera_tactile is True.
If None, camera-based sensing will be disabled even if :attr:`enable_camera_tactile` is True.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved as suggested.

Comment on lines 74 to 75
sensor_data_dir_name: str = "gelsight_r15_data"
"""Directory name containing the sensor calibration and background data."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should explain in docstrings here w.r.t. where this directory is specified. If it is relative vs. absolute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add explain here

Comment on lines 44 to 48
Path Resolution:
- If ``base_data_path`` is ``None`` (default): Downloads from Isaac Lab Nucleus at
``{ISAACLAB_NUCLEUS_DIR}/TacSL/{sensor_data_dir_name}/{filename}``
- If ``base_data_path`` is provided: Uses custom path at
``{base_data_path}/{sensor_data_dir_name}/{filename}``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all this might be better described in the docstrings of individual parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved as suggested here

Comment on lines 86 to 87
image_height: int = 320
"""Height of the tactile image in pixels."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer keeping MISSING for everything so users know form the config instance what params are set. Default valeus are only provided if users are seldom expected to modify them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Updated these params to MISSING in this commit.

num_bins: int = 120
"""Number of bins for gradient magnitude and direction quantization."""

mm_per_pixel: float = 0.0877
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this sensor resolution? Is it different from margin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used to render a 2D rgb image from the height map here , see the updated docstring here


VISUO_TACTILE_SENSOR_MARKER_CFG = VisualizationMarkersCfg(
markers={
"debug_pts": sim_utils.SphereCfg(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"debug_pts": sim_utils.SphereCfg(
"taxels": sim_utils.SphereCfg(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "tacsl_pts"

Comment on lines 47 to 49
# Default to Isaac Lab Nucleus directory - download and cache
nucleus_path = os.path.join(ISAACLAB_NUCLEUS_DIR, "TacSL", data_dir, file_name)
cache_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), data_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, I recommend asking users to always provide the full path and not assume any hard coding with "TacSL". You could check if the file is local or not using this function: https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab/isaaclab/utils/assets.py#L43

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified the retrieval logic with the function retrieve_file_path to handle local/Nucleus paths here. Combined the hardcoding "TacSL" into base_data_path here

return cache_path


def visualize_tactile_shear_image(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"visualize" always sounds like this is going to show the image too. Might be better to simply call this "compute"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Changed "visualize " to "compute".

# Camera configuration
camera_cfg=TiledCameraCfg(
prim_path="{ENV_REGEX_NS}/Robot/elastomer_tip/cam",
update_period=1 / 60, # 60 Hz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is sensor tick here affecting the sensor tick of the gelsight sensor too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out. The camera's update_period should be consistent with the sensor. Fixed here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be called to match GelsightRender? For instance: `visuotactile_render.py'? Is this call very specific to gelsignt or other visual tactile sensors also work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to visuotactile_render.py . Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed from "gelsight_utils.py" to "visuotactile_render.py"

from .visuotactile_sensor_cfg import GelSightRenderCfg


def get_gelsight_render_data(base_data_path: str | None, data_dir: str, file_name: str) -> str | None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these functions used outside this module? If not, can we move them to be helpers inside the class so developers don't concern themselves with understanding it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to inside the class as suggested in this commit

@kellyguo11 kellyguo11 moved this from In review to In progress in Isaac Lab Nov 26, 2025
@JuanaDd JuanaDd moved this from In progress to In review in Isaac Lab Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation enhancement New feature or request isaac-lab Related to Isaac Lab team

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

5 participants