Unverified Commit 06ada157 authored by fyu-bdai's avatar fyu-bdai Committed by GitHub

Adds unit test for the contact sensor class (#464)

# Description

Adds a unit test for the the data reported by ContactSensor over
different contact primitives, ground surfaces, contact times, and
devices. This test spawns in a contact primitive, and sets the contact
primitive in contact in the ground or in the air for a pre-determined
amount of time, then checks that the ContactSensor data agrees with the
expected values.

Note: 

Although this unit test uses all available primitive shapes in Isaac
Sim, `[box, capsule, cylinder, cone, sphere]`, only test cases where
exact collision models (capsule, sphere, box) are available are used.
This is because ContactSensor does not work on Cylinder<->Mesh
collisions and Cone<->Mesh collisions unfortunately.

Update:

Capsule<->Mesh collisions also do not work in certain cases, see #470.
Capsule tests have also been removed from this unit test.

## Type of change

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

## Screenshots

Please attach before and after screenshots of the change if applicable.
![Screenshot from 2024-03-20
17-49-13](https://github.com/isaac-orbit/orbit/assets/156015326/bfff41a1-7c04-4824-aaed-3ce7e0bfd4bd)
![Screenshot from 2024-03-20
17-50-14](https://github.com/isaac-orbit/orbit/assets/156015326/f30e77d2-ff30-4805-96bd-6c7106a1db7b)
![Screenshot from 2024-03-20
17-51-03](https://github.com/isaac-orbit/orbit/assets/156015326/7037dc4b-147b-4221-bcd5-8c39d39c4709)
![Screenshot from 2024-03-20
17-54-09](https://github.com/isaac-orbit/orbit/assets/156015326/ed40604b-67d9-4f81-8272-b36a7c92b21e)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] 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 run all the tests with `./orbit.sh --test` and they pass
- [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
parent b706a916
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment