Skip to content
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

Multiple issues with contact checking #935

Open
ChengshuLi opened this issue Oct 4, 2024 · 1 comment
Open

Multiple issues with contact checking #935

ChengshuLi opened this issue Oct 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ChengshuLi
Copy link
Member

ChengshuLi commented Oct 4, 2024

  1. Currently we have two ways of checking contacts, should unify
  • RigidContactAPI (this doesn't work for kinematic-only objects)
  • contact sensor: omni.isaac.sensor._sensor.acquire_contact_sensor_interface()
  1. For both methods, it seems that we only get contacts from the last physics step, instead of accumulating all the contacts from all the physics steps of the last sim step.
  • This can lead to problems because if two objects penetrate and then de-penetrate within the same sim step, no contact will be detected.
  • We have a contact subscription system, but it's currently only used for the Attached state
  1. RigidContactAPI has false positives
  • contact sensor reports contact, GUI shows contact, but the impulses from RigidContactAPI are all zeros.
@ChengshuLi ChengshuLi self-assigned this Oct 4, 2024
@ChengshuLi ChengshuLi added the enhancement New feature or request label Oct 4, 2024
@ChengshuLi ChengshuLi changed the title Unify contact checking Multiple issues with contact checking Oct 4, 2024
@hang-yin hang-yin self-assigned this Oct 10, 2024
@hang-yin
Copy link
Contributor

hang-yin commented Oct 10, 2024

Here's our current understanding:

Consider this scenario -
image
while all three objects are clearly touching/contacting each other, the RigidContactView gives all zeros for both impulse and contact. Even if we wake all objects after they fall asleep, we would still get the same result.

Now consider this assisted grasping scenario -
image
when the robot fingers get in contact with the red cube, we would get non-zero impulse and valid contact data from RigidContactView (GripperRigidContactAPI in this specific case). That is exactly how assisted grasping is established. However, once the cube is grasped and things settle, we would again get zero impulse and contact data.

There are essentially three stages of a contact:

  1. Contact occurs (obj A moves to touch obj B)
  2. Contact continues (obj A keeps touching obj B)
  3. Contact ends (obj A moves away from obj B)

Presumably, the RigidContactView only gives valid data during stage 1. This is perfectly fine for assisted grasping, as AG is checked per physics step. However, this is not fine for some of our other use cases, e.g. ToggleOn state checking, as continual contact is required. This would explain why our ToggleOn test is so flaky.

There are currently three ways we deal with contact:

  • Contact report events subscribed by our Simulator instance
    • We can do something in the _on_contact callback when any contact happens
    • Current usage:
      • attachment
  • RigidContactAPI implemented with RigidContactView
    • This only works during initial contact, not when objects are settled
    • Current usage:
      • transition rules TouchingAnyCondition (optimized version)
      • SlicerActive state checking if a slicer is touching sliceables;
      • ToggleOn state checking if robot fingers is in contact with a toggle button for some number of steps
      • Robot collision checking in motion planning utils (soon to be replaced with curobo)
      • Assisted grasping
  • Contact Sensor attached to rigid prims
    • This always work, but could be slow
    • Current usage:
      • ContactBodies state and as dependency for many states (e.g. ParticleModifier, Touching, SlicerActive)
      • Draped state
      • transition rules TouchingAnyCondition (non-optimized version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants