fix(gello): add position field move_joint arg
This commit is contained in:
parent
3e2bb466a8
commit
643b9aec38
2 changed files with 3 additions and 2 deletions
2
gello.py
2
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(
|
||||
|
|
3
utils.py
3
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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue