Skip to content

Improves various points in contact sensor tests #2983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ooctipus
Copy link
Collaborator

@ooctipus ooctipus commented Jul 19, 2025

Description

the logic in original contact sensor tests was a bit convoluted,

  1. disable_contact_processing was parameterized over many tests, even expensive ones. What is trying to test is just that creating scene will disable able it. This PR created one separate test just for that, and removed all other disable_contact_processing pytest parameterization

  2. what suppose to be pytest parameters were hidden within a deeply nested helper function, and using multiple for loop to test each case. This can undermine the testing suites clarity when bug shows up as you don't know which hyparameter was causing the issue. I brought the for loop from deeper level to more surface level, whether or not to embed it into pytest parameter needs to confirm with original author and check for any oversight

  3. added robust multi-envs, random contact location to stress test the collision. This tests are currently skipped due to it will fail. Need to work with sim and physx team to make sure they pass, and they will be serve for rigorous regression test.

  4. refactored a bit of code, so all testing for contact sensors (testing air/contact time, testing contact positions, testing contact forces) can be configured nicely(avoid too many if else)

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

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

@ooctipus ooctipus force-pushed the contact_sensor_test_suite_improvements branch from 4441f67 to 779f6c0 Compare July 19, 2025 23:38
@ooctipus
Copy link
Collaborator Author

This PR requires #2842 to be merged first, because it improves upon the test written for contact positions which doesn't exist in main yet

@ooctipus ooctipus force-pushed the contact_sensor_test_suite_improvements branch from 779f6c0 to e07cb78 Compare July 30, 2025 17:48
@ooctipus ooctipus force-pushed the contact_sensor_test_suite_improvements branch 2 times, most recently from 3819f22 to 707e54f Compare August 7, 2025 07:45
@kellyguo11 kellyguo11 changed the title Improved various points in contact sensor tests Improves various points in contact sensor tests Aug 7, 2025
@kellyguo11
Copy link
Contributor

looks like this could also use a linter run

Copy link

github-actions bot commented Aug 8, 2025

Test Results Summary

2 408 tests   1 999 ✅  2h 15m 35s ⏱️
   90 suites    408 💤
    1 files        0 ❌  1 🔥

For more details on these errors, see this check.

Results for commit f9488a7.

♻️ This comment has been updated with latest results.

@ooctipus ooctipus force-pushed the contact_sensor_test_suite_improvements branch from 289196d to f9488a7 Compare August 8, 2025 03:27
@ooctipus ooctipus closed this Aug 10, 2025
@ooctipus ooctipus deleted the contact_sensor_test_suite_improvements branch August 10, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants