Skip to content

Commit

Permalink
A few RigidContactAPI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hang-yin committed Oct 15, 2024
1 parent 3866ca7 commit 964c09b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
7 changes: 0 additions & 7 deletions omnigibson/object_states/touching.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from omnigibson.object_states.kinematics_mixin import KinematicsMixin
from omnigibson.object_states.object_state_base import BooleanStateMixin, RelativeObjectState
from omnigibson.utils.constants import PrimType
from omnigibson.utils.usd_utils import RigidContactAPI


class Touching(KinematicsMixin, RelativeObjectState, BooleanStateMixin):
Expand All @@ -20,11 +19,5 @@ def _get_value(self, other):
return self._check_contact(other, self.obj)
elif other.prim_type == PrimType.CLOTH:
return self._check_contact(self.obj, other)
# elif not self.obj.kinematic_only and not other.kinematic_only:
# # Use optimized check for rigid bodies
# return RigidContactAPI.in_contact(
# prim_paths_a=[link.prim_path for link in self.obj.links.values()],
# prim_paths_b=[link.prim_path for link in other.links.values()],
# )
else:
return self._check_contact(other, self.obj) and self._check_contact(self.obj, other)
1 change: 0 additions & 1 deletion omnigibson/transition_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from omnigibson.utils.python_utils import Registerable, classproperty, subclass_factory, torch_delete
from omnigibson.utils.registry_utils import Registry
from omnigibson.utils.ui_utils import create_module_logger, disclaimer
from omnigibson.utils.usd_utils import RigidContactAPI

# Create module logger
log = create_module_logger(module_name=__name__)
Expand Down
2 changes: 1 addition & 1 deletion omnigibson/utils/usd_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def get_column_filters(cls):

@classmethod
def get_max_contact_data_count(cls):
return 0
return 256

def initialize_view(self):
"""
Expand Down

0 comments on commit 964c09b

Please sign in to comment.