Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu Fang committed Nov 26, 2024
1 parent 7e7df3e commit fc86b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robosuite/devices/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit fc86b58

Please sign in to comment.