adjust initial pose of robotic arms

This commit is contained in:
2026-07-14 17:20:50 +08:00
parent 8aed1687f3
commit 33734524ed
12 changed files with 72 additions and 36 deletions

View File

@ -0,0 +1,19 @@
from xr_rm_teleop.realman_adapter import RealManAdapter
def test_initial_pose_uses_joint_move_only() -> None:
class FakeArm:
def __init__(self) -> None:
self.calls = []
def rm_movej(self, *args):
self.calls.append(args)
return 0
joints = [-167.21, 28.48, 28.21, 61.35, -14.40, 84.49, -124.51]
adapter = RealManAdapter("127.0.0.1", 8080, 0, 1, initial_joint_pose=joints)
adapter._arm = FakeArm()
adapter._move_to_initial_pose()
assert adapter._arm.calls == [(joints, 20, 0, 0, 1)]