diff --git a/gello.py b/gello.py index 5588fb6..4bc3fb5 100644 --- a/gello.py +++ b/gello.py @@ -114,7 +114,7 @@ class RobotControllerNode(Node): def run_sequence(self): print(f"STEP #{self.sequence_step}") - self.robot_client.move_joint(self.last_gello[:-1]) + self.robot_client.move_joint(self.last_gello.position[:-1]) if not self.waiting_for_gripper: self.waiting_for_gripper = True threading.Thread( diff --git a/utils.py b/utils.py index cad8c0a..3a9fcb8 100644 --- a/utils.py +++ b/utils.py @@ -176,12 +176,13 @@ class RobotClient: raise RuntimeError(f"move_line failed: {ret}") self.wait_untill_motion_is_done(10.0) - def move_joint(self, joint_radian: list) -> None: + def move_joint(self, joint_radian: list) -> bool: cmd = {"command": "move_joint", "joint_radian": joint_radian} ret = self._send_single_json(cmd, 10.0) if ret.get("ret") != 0: raise RuntimeError(f"move_joint failed: {ret}") self.wait_untill_motion_is_done(10.0) + return True def wait_untill_motion_is_done(self, timeout=10.0): """