Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 12, 2024
1 parent a375fca commit 2f7a8f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion omnigibson/controllers/multi_finger_gripper_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ def _update_grasping_state(self, control_dict):
dist_from_upper_limit = max_pos - finger_pos

# If either of the joint positions are not near the joint limits with some tolerance (m.POS_TOLERANCE)
valid_grasp_pos = th.mean(dist_from_lower_limit) > m.POS_TOLERANCE or th.mean(dist_from_upper_limit) > m.POS_TOLERANCE
valid_grasp_pos = (
th.mean(dist_from_lower_limit) > m.POS_TOLERANCE or th.mean(dist_from_upper_limit) > m.POS_TOLERANCE
)

# And the joint velocities are close to zero with some tolerance (m.VEL_TOLERANCE)
valid_grasp_vel = th.all(th.abs(finger_vel) < m.VEL_TOLERANCE)
Expand Down

0 comments on commit 2f7a8f8

Please sign in to comment.