From 2f7a8f8d0646eb70c70eb53f6ff980e27052e24d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:02:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- omnigibson/controllers/multi_finger_gripper_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/omnigibson/controllers/multi_finger_gripper_controller.py b/omnigibson/controllers/multi_finger_gripper_controller.py index 5506be3a6..35e83b48a 100644 --- a/omnigibson/controllers/multi_finger_gripper_controller.py +++ b/omnigibson/controllers/multi_finger_gripper_controller.py @@ -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)