From 6ca54a11dd96d70e8049040c1fb230d4e47b994a Mon Sep 17 00:00:00 2001 From: Remi Cadene Date: Thu, 3 Oct 2024 14:34:28 +0200 Subject: [PATCH] WIP --- lerobot/configs/robot/so_100.yaml | 2 +- lerobot/scripts/configure_motor.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lerobot/configs/robot/so_100.yaml b/lerobot/configs/robot/so_100.yaml index 5506cb265..738254d90 100644 --- a/lerobot/configs/robot/so_100.yaml +++ b/lerobot/configs/robot/so_100.yaml @@ -23,7 +23,7 @@ leader_arms: follower_arms: main: _target_: lerobot.common.robot_devices.motors.feetech.FeetechMotorsBus - port: /dev/tty.usbmodem585A0080521 + port: /dev/tty.usbmodem585A0080971 motors: # name: (index, model) shoulder_pan: [1, "sts3215"] diff --git a/lerobot/scripts/configure_motor.py b/lerobot/scripts/configure_motor.py index f3b1917ae..488a1229a 100644 --- a/lerobot/scripts/configure_motor.py +++ b/lerobot/scripts/configure_motor.py @@ -118,10 +118,15 @@ def configure_motor(port, brand, model, motor_idx_des, baudrate_des): if brand == "feetech": motor_bus.write("Goal_Position", 2047) time.sleep(4) - motor_bus.write("Offset", 2047) + print("Present Position", motor_bus.read("Present_Position")) + + motor_bus.write("Offset", 2027) time.sleep(4) - breakpoint() - motor_bus.read("Present_Position") + print("Offset", motor_bus.read("Offset")) + + while True: + print("Present Position", motor_bus.read("Present_Position")) + time.sleep(0.5) except Exception as e: print(f"Error occurred during motor configuration: {e}")