From 3462fccb559c3f0909552d93caaf3ec2de503d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20G=C3=B6kmen?= Date: Wed, 13 Dec 2023 11:45:03 -0800 Subject: [PATCH] Fix has_limits --- omnigibson/prims/joint_prim.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/omnigibson/prims/joint_prim.py b/omnigibson/prims/joint_prim.py index 8f6b778ca..e5be6dda8 100644 --- a/omnigibson/prims/joint_prim.py +++ b/omnigibson/prims/joint_prim.py @@ -87,8 +87,6 @@ def __init__( # Other values that will be filled in at runtime self._joint_type = None self._control_type = None - self._dof_properties = None - self._joint_state_api = None self._driven = None # The following values will only be valid if this joint is part of an articulation @@ -133,7 +131,6 @@ def _post_load(self): # happens because joint prims are usually created externally during an EntityPrim's initialization phase assert self._prim.HasAPI(PhysxSchema.JointStateAPI), \ "Revolute or Prismatic joints must already have JointStateAPI added!" - self._joint_state_api = PhysxSchema.JointStateAPI(self._prim, state_type) # Possibly set the bodies if "body0" in self._load_config and self._load_config["body0"] is not None: @@ -314,16 +311,6 @@ def control_type(self): """ return self._control_type - @property - def dof_properties(self): - """ - Returns: - list of DOFProperties: Per-DOF properties for this joint. - See https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.dynamic_control/docs/index.html#omni.isaac.dynamic_control._dynamic_control.DofProperties - for more information. - """ - return self._dof_properties - @property def max_velocity(self): """ @@ -512,7 +499,7 @@ def has_limit(self): """ # Only support revolute and prismatic joints for now assert self.is_single_dof, "Joint properties only supported for a single DOF currently!" - return self._dof_properties[0].has_limits + return np.all(np.abs(self._articulation_view.get_joint_limits(joint_indices=self.dof_indices)) < m.INF_POS_THRESHOLD) @property def axis(self):