Skip to content

Commit 2894b6a

Browse files
Fixes missing asgument in calls to ConactSensor.find_bodies
1 parent 6cbf001 commit 2894b6a

File tree

1 file changed

+4
-4
lines changed
  • source/extensions/omni.isaac.orbit/omni/isaac/orbit/sensors/contact_sensor

1 file changed

+4
-4
lines changed

source/extensions/omni.isaac.orbit/omni/isaac/orbit/sensors/contact_sensor/contact_sensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@ def reset(self, env_ids: Sequence[int] | None = None):
138138
self._data.current_contact_time[env_ids] = 0.0
139139
self._data.last_contact_time[env_ids] = 0.0
140140

141-
def find_bodies(self, name_keys: str | Sequence[str]) -> tuple[list[int], list[str]]:
141+
def find_bodies(self, name_keys: str | Sequence[str], preserve_order: bool = False) -> tuple[list[int], list[str]]:
142142
"""Find bodies in the articulation based on the name keys.
143143
144144
Args:
145-
name_keys: A regular expression or a list of regular expressions
146-
to match the body names.
145+
name_keys: A regular expression or a list of regular expressions to match the body names.
146+
preserve_order: Whether to preserve the order of the name keys in the output. Defaults to False.
147147
148148
Returns:
149149
A tuple of lists containing the body indices and names.
150150
"""
151-
return string_utils.resolve_matching_names(name_keys, self.body_names)
151+
return string_utils.resolve_matching_names(name_keys, self.body_names,preserve_order)
152152

153153
def compute_first_contact(self, dt: float, abs_tol: float = 1.0e-8) -> torch.Tensor:
154154
"""Checks if bodies that have established contact within the last :attr:`dt` seconds.

0 commit comments

Comments
 (0)