From 297db1dc04f3d9722589bf4144ddbba065e01c97 Mon Sep 17 00:00:00 2001 From: Yu Fang Date: Thu, 21 Nov 2024 17:59:45 -0800 Subject: [PATCH] Revert unnecessary changes --- robosuite/devices/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/robosuite/devices/device.py b/robosuite/devices/device.py index 43ec49a9ce..32da777a0d 100644 --- a/robosuite/devices/device.py +++ b/robosuite/devices/device.py @@ -123,7 +123,7 @@ def input2action(self, mirror_actions=False) -> Optional[Dict]: # Scale rotation for teleoperation (tuned for OSC) -- gains tuned for each device dpos, drotation = self._postprocess_device_outputs(dpos, drotation) # map 0 to -1 (open) and map 1 to 1 (closed) - grasp = 1.0 if grasp else -1.0 + grasp = 1 if grasp else -1 ac_dict = {} # populate delta actions for the arms @@ -166,7 +166,7 @@ def input2action(self, mirror_actions=False) -> Optional[Dict]: ac_dict[f"{active_arm}_gripper"] = np.array([grasp] * gripper_dof) # clip actions between -1 and 1 - for k, v in ac_dict.items(): + for (k, v) in ac_dict.items(): if "abs" not in k: ac_dict[k] = np.clip(v, -1, 1)