Update feetech tables

This commit is contained in:
Simon Alibert
2025-04-16 11:01:12 +02:00
parent 2bb73ac431
commit 2743c29a96
3 changed files with 32 additions and 17 deletions
+3 -3
View File
@@ -672,7 +672,7 @@ class LeKiwi:
"""
Reads the raw speeds for all wheels. Returns a dictionary with motor names:
"""
raw_speeds = self.motor_bus.read("Present_Speed", self.motor_ids)
raw_speeds = self.motor_bus.read("Present_Velocity", self.motor_ids)
return {
"left_wheel": int(raw_speeds[0]),
"back_wheel": int(raw_speeds[1]),
@@ -684,9 +684,9 @@ class LeKiwi:
Sends raw velocity commands (16-bit encoded values) directly to the motor bus.
The order of speeds must correspond to self.motor_ids.
"""
self.motor_bus.write("Goal_Speed", command_speeds, self.motor_ids)
self.motor_bus.write("Goal_Velocity", command_speeds, self.motor_ids)
def stop(self):
"""Stops the robot by setting all motor speeds to zero."""
self.motor_bus.write("Goal_Speed", [0, 0, 0], self.motor_ids)
self.motor_bus.write("Goal_Velocity", [0, 0, 0], self.motor_ids)
print("Motors stopped.")