This commit is contained in:
Remi Cadene
2024-10-03 14:34:28 +02:00
parent 62651cb2a9
commit 6ca54a11dd
2 changed files with 9 additions and 4 deletions

View File

@@ -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"]

View File

@@ -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}")