Skip to content

Commit d10de3e

Browse files
author
Yu Fang
committed
Revert unnecessary changes
1 parent 55b9a0b commit d10de3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

robosuite/devices/device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def input2action(self, mirror_actions=False) -> Optional[Dict]:
123123
# Scale rotation for teleoperation (tuned for OSC) -- gains tuned for each device
124124
dpos, drotation = self._postprocess_device_outputs(dpos, drotation)
125125
# map 0 to -1 (open) and map 1 to 1 (closed)
126-
grasp = 1.0 if grasp else -1.0
126+
grasp = 1 if grasp else -1
127127

128128
ac_dict = {}
129129
# populate delta actions for the arms
@@ -166,7 +166,7 @@ def input2action(self, mirror_actions=False) -> Optional[Dict]:
166166
ac_dict[f"{active_arm}_gripper"] = np.array([grasp] * gripper_dof)
167167

168168
# clip actions between -1 and 1
169-
for k, v in ac_dict.items():
169+
for (k, v) in ac_dict.items():
170170
if "abs" not in k:
171171
ac_dict[k] = np.clip(v, -1, 1)
172172

0 commit comments

Comments
 (0)