Skip to content

Commit

Permalink
ur5e fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wuphilipp committed Apr 5, 2024
1 parent 2888885 commit daae81f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gello/robots/robotiq_gripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ def move(self, position: int, speed: int, force: int) -> Tuple[bool, int]:
:return: A tuple with a bool indicating whether the action it was successfully sent, and an integer with
the actual position that was requested, after being adjusted to the min/max calibrated range.
"""
position = int(position)
speed = int(speed)
force = int(force)

def clip_val(min_val, val, max_val):
return max(min_val, min(val, max_val))
Expand Down Expand Up @@ -317,6 +320,10 @@ def move_and_wait_for_pos(
that the move had completed, a status indicating how the move ended (see ObjectStatus enum for details). Note
that it is possible that the position was not reached, if an object was detected during motion.
"""
position = int(position)
speed = int(speed)
force = int(force)

set_ok, cmd_pos = self.move(position, speed, force)
if not set_ok:
raise RuntimeError("Failed to set variables for move.")
Expand Down

0 comments on commit daae81f

Please sign in to comment.