feat: 复用适配器初始位姿运动

This commit is contained in:
2026-07-31 15:30:20 +08:00
parent 3981c380ea
commit 5267da14c2
2 changed files with 29 additions and 5 deletions
+13 -1
View File
@@ -30,11 +30,23 @@ def test_initial_pose_uses_joint_move_only() -> None:
)
adapter._arm = FakeArm()
adapter._move_to_initial_pose()
adapter.move_to_initial_pose()
assert adapter._arm.calls == [(joints, 20, 0, 0, 1)]
def test_mock_initial_pose_restores_configured_joints() -> None:
initial_degrees = [-78.81, 3.22, 67.96, 97.12, 95.08, -81.11, -74.55]
adapter = MockRealManAdapter(initial_degrees)
adapter.send_joint_target([0.0] * 7, follow=False)
adapter.move_to_initial_pose()
assert adapter.read_joint_state().positions == pytest.approx(
[math.radians(value) for value in initial_degrees]
)
def test_peripheral_config_exposes_selected_tool() -> None:
config = PeripheralConfig(
scissorgripper=1,