IsaacLab icon indicating copy to clipboard operation
IsaacLab copied to clipboard

Adds friction force reporting to ContactSensor

Open gattra-rai opened this issue 3 months ago • 5 comments

Description

This PR extends the ContactSensor class to expose aggregated friction forces for each filtered body. It uses the same vectorized approach used for contact_points.

Concretely, this change introduces:

  • ContactSensorCfg.track_friction_forces toggle to turn on friction tracking
  • ContactSensorData.friction_forces_w where the sum of friction forces for each filtered body are stored

Fixes https://github.com/isaac-sim/IsaacLab/issues/2074, #2064

Performance

Results of check_contact_sensor.py with track_friction_data = False:

avg dt real-time 0.017448579105403043
avg dt real-time 0.017589360827958443
avg dt real-time 0.016146250123070787

Results of check_contact_sensor.py with track_friction_data = True:

avg dt real-time 0.01818224351439858
avg dt real-time 0.017720674386015163
avg dt real-time 0.01777262271923246

Type of change

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

Checklist

  • [x] I have read and understood the contribution guidelines
  • [x] I have run the pre-commit checks 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

gattra-rai avatar Sep 25 '25 16:09 gattra-rai

I am curious how do you use the friction force for your learning setup, would love to learn how you guys are using it : ))

ooctipus avatar Oct 17 '25 18:10 ooctipus

@greptileai some help ;)

Mayankm96 avatar Oct 22 '25 06:10 Mayankm96

@greptileai everything you said. Whatever it takes to improve the MR and make it less error-prone and feature complete :)

Mayankm96 avatar Oct 22 '25 06:10 Mayankm96

Responding to greptile's suggestions:

  1. Done
  2. Won't do. This was an intentional design choice as friction forces can be zero if not in contact, whereas contact points cannot
  3. Done
  4. Done
  5. Done

gattra-rai avatar Oct 22 '25 18:10 gattra-rai

@gattra-rai could you take a look at the doc build issues? https://github.com/isaac-sim/IsaacLab/actions/runs/19120652606/job/54640238296?pr=3563. perhaps some of the suggestions from greptile might help

kellyguo11 avatar Nov 06 '25 03:11 kellyguo11