adjust initial pose of robotic arms
This commit is contained in:
19
xr_rm_teleop/test/test_initial_joint_pose.py
Normal file
19
xr_rm_teleop/test/test_initial_joint_pose.py
Normal 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)]
|
||||
Reference in New Issue
Block a user