fix(arm): compensate for reversed J1 motor direction

J1 motor rotation is reversed after replacement: code height=0 now maps to physical bottom (was -290). Fix by adding +290 offset in UDP command (to_udp_message and keyboard_control). User-facing coordinate system (-290=bottom, 0=top) is unchanged; FK/IK/state tracking unaffected.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-19 10:17:58 +08:00
parent e3d997dafe
commit 6a0ff886f3
2 changed files with 2 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ class ArmJointState:
def to_udp_message(self) -> bytes:
"""转换为 UDP 消息"""
return (
f"JXB:{self.height}:{self.j2}:{self.j3}:{self.j4}:"
f"JXB:{self.height + 290}:{self.j2}:{self.j3}:{self.j4}:"
f"{self.j5}:{self.j6}:0:0:EZHY\n"
).encode("utf-8")

View File

@@ -310,7 +310,7 @@ class KeyboardUdpControlNode(Node):
def build_arm_cmd(self):
joints = self.arm_joints
return (
f"JXB:{self.arm_height}:"
f"JXB:{self.arm_height + 290}:"
f"{joints[0]}:{joints[1]}:{joints[2]}:"
f"{joints[3]}:{joints[4]}:0:0:EZHY\n"
).encode()