feat(experement): simulate tightening and smooth tool transfers
Add a torque-tool tightening simulation for experiments 14-20: the tool approaches each empty hole, twists 60 degrees (reversing at the wrist limit), returns and retracts while the screw stays handed off. Lift attached tools vertically clear of the magazine before lateral motion, prefer the close 'work' pose between operations, and reconfigure through home only when planning fails. Settle measured joint positions before verifying joint moves.
This commit is contained in:
@@ -88,21 +88,24 @@ def test_screw_experiments_have_installed_hatch_and_ten_screws():
|
||||
assert spec.cap_state == 'installed'
|
||||
assert spec.tray_pose is not None
|
||||
assert len(spec.screws) == 10
|
||||
assert spec.tool_names == ('magnetic_tool',)
|
||||
assert 'torque_tool' not in spec.tool_names
|
||||
if experiment_id in (14, 15):
|
||||
assert set(spec.tool_names) == {'magnetic_tool', 'torque_tool'}
|
||||
else:
|
||||
assert spec.tool_names == ('magnetic_tool',)
|
||||
assert len(spec.screw_holes) == {
|
||||
11: 1, 12: 2, 13: 3, 14: 4, 15: 4,
|
||||
}[experiment_id]
|
||||
|
||||
|
||||
def test_full_assembly_experiments_have_loose_hatch_tray_and_no_torque_tool():
|
||||
def test_full_assembly_experiments_have_loose_hatch_tray_and_all_tools():
|
||||
for experiment_id in range(16, 21):
|
||||
spec = scenario(experiment_id)
|
||||
assert spec.cap_state == 'free'
|
||||
assert spec.tray_pose is not None
|
||||
assert len(spec.screws) == 10
|
||||
assert set(spec.tool_names) == {'vacuum', 'magnetic_tool', 'sealant_tool'}
|
||||
assert 'torque_tool' not in spec.tool_names
|
||||
assert set(spec.tool_names) == {
|
||||
'vacuum', 'magnetic_tool', 'sealant_tool', 'torque_tool',
|
||||
}
|
||||
assert len(spec.screw_holes) == {16: 1, 17: 2, 18: 4, 19: 4, 20: 4}[experiment_id]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user