mix control fix bug

This commit is contained in:
2025-06-09 10:58:28 +08:00
parent cf8df17d3a
commit 55f284b306
5 changed files with 585 additions and 13 deletions

View File

@@ -2,4 +2,4 @@ port: /dev/ttyUSB0
right_port: /dev/ttyUSB1
baudrate: 460800
hex_data: "55 AA 02 00 00 67"
arm_axis: 7
arm_axis: 6

View File

@@ -79,6 +79,7 @@ class ServoArm:
grasp_byte_data = bytearray.fromhex(grasp_hex)
# 夹爪进行归一化处理
grasp_value = self._bytes_to_signed_int(grasp_byte_data)/1000
# print(grasp_value)
joints["grasp"] = grasp_value
return joints
@@ -105,7 +106,7 @@ class ServoArm:
self.bytes_to_send = self.bytes_to_send[:74] + action_bytes + self.bytes_to_send[78:]
if __name__ == "__main__":
servo_arm = ServoArm("/home/rm/code/shadow_rm_aloha/config/servo_left_arm.yaml")
servo_arm = ServoArm("/home/maic/LYT/lerobot/realman_src/realman_aloha/shadow_rm_robot/config/servo_arm.yaml")
while True:
joint_actions = servo_arm.get_joint_actions()
logging.info(joint_actions)