Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Dec 13, 2023
1 parent 8265936 commit 757b144
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions omnigibson/prims/entity_prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _load(self):

def _post_load(self):
# Prepare the articulation view (at this point only working via the USD interface)
self._articulation_view = ExtendedArticulationView(self._prim_path)
self._articulation_view = ExtendedArticulationView(self._prim_path + "/base_link")

# If this is a cloth, delete the root link and replace it with the single nested mesh
if self._prim_type == PrimType.CLOTH:
Expand Down Expand Up @@ -235,7 +235,7 @@ def update_joints(self):
for i in range(self._articulation_view._metadata.joint_count):
joint_name = self._articulation_view._metadata.joint_names[i]
joint_dof_offset = self._articulation_view._metadata.joint_dof_offsets[i]
joint_path = self._articulation_view.dof_paths[0][joint_dof_offset]
joint_path = self._articulation_view._dof_paths[0][joint_dof_offset]
# Only add the joint if it's not fixed (i.e.: it has DOFs > 0)
if self._articulation_view._metadata.joint_dof_counts[i] > 0:
joint = JointPrim(
Expand Down
4 changes: 2 additions & 2 deletions omnigibson/prims/joint_prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def update_handles(self):
"""
# It's a bit tricky to get the joint index here. We need to find the first dof at this prim path
# first, then get the corresponding joint index from that dof offset.
self._joint_dof_offset = list(self._articulation_view.dof_paths[0]).index(self._prim_path)
self._joint_dof_offset = list(self._articulation_view._dof_paths[0]).index(self._prim_path)
self._joint_idx = list(self._articulation_view._metadata.joint_dof_offsets).index(self._joint_dof_offset)
self._joint_name = self._articulation_view._metadata.joint_names[self._joint_idx]
self._n_dof = self._articulation_view._metadata.joint_dof_counts[self._joint_idx]
Expand Down Expand Up @@ -558,7 +558,7 @@ def articulated(self):
Returns:
bool: Whether this joint is articulated or not
"""
return self._art is not None
return self.n_dof > 0

@property
def is_revolute(self):
Expand Down

0 comments on commit 757b144

Please sign in to comment.