Skip to content

Commit

Permalink
Be a bit more descriptive with some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Oct 18, 2023
1 parent 4f3b6fa commit bdc9f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omnigibson/prims/entity_prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,9 @@ def get_joint_positions(self, normalized=False):
assert self._handle is not None, "handles are not initialized yet!"
assert self.n_joints > 0, "Tried to call method not intended for entity prim with no joints!"

assert self._dc is not None, "Dynamic control interface is not initialized!"
assert self._dc is not None, f"Dynamic control interface is not initialized for {self._name}"
joint_states = self._dc.get_articulation_dof_states(self._handle, _dynamic_control.STATE_POS)
assert joint_states is not None, "Failed to get joint states!"
assert joint_states is not None, f"Failed to get joint states for {self.name}"
joint_positions = joint_states["pos"]

# Possibly normalize values when returning
Expand Down

0 comments on commit bdc9f17

Please sign in to comment.