RS-3 sample rack re-cap and re-rack check
harbor run -t reactive-labs/tube-recappingharbor download reactive-labs/tube-recappingHi,
Store room 2 has an I2RT YAM arm at a check station: an RS-3 rack of screw-cap sample tubes is clamped in front of it, under an overhead camera, before the rack goes back in the freezer. Please write the controller that checks a rack: caps that were not screwed down are tightened to the torque window by turning the wrist, and tubes that stand in the wrong slot are moved, by cap colour, to where the rack's slot map says. The tubes stand 20 mm apart, the caps are the only thing that tells the sample sets apart, and another group's orange-capped tubes, which look a lot like our red ones, are sometimes in our racks and must not be touched. A loose cap stands a millimetre or two higher than a tight one; a cap turned too far cracks; a tube lifted by a loose cap leaks. Nothing reports where anything is: the arm has an overhead camera with depth, a wrist camera with depth, its joint and finger readings and the wrist motor's torque reading. Things go wrong at the station (a cap backs off just after it was tightened, a tube turns in the fingers while it is carried, a tube put back bumps its neighbour up out of its socket), and the controller has to notice and put it right. If the gripper stops responding or the overhead camera freezes it has to put down what it holds, stop, and say which of the two failed.
Everything is in /app:
REQUEST.md);SLOT_MAP.md);CELL_SHEET.md);ATTEMPT_LOG.md);scene.xml, robot/) and the acceptance setup (task.py, gauntlet/);python3 /app/run_gauntlet.py --controller /app/controller.py --tiers T0,T1,T2,T3,T4 --episodes 2.The motion-planning, vision and sim-to-real skills our integrator uses are in /app/skills/.
Please write /app/controller.py with a Controller class (__init__(model_info), reset(obs), act(obs)).
act returns the 7 position commands (6 joints, then the finger opening in metres) or a status:
{"status": "done"} or {"status": "abort", "fault": "dead_gripper"} / "perception_freeze". Don't change
scene.xml, task.py or robot/yam_linear_4310.xml.
Thanks, Sample store lead, Marrow Lane Biorepository
/app/controller.py. It runs in its own process and receives only model_info (keys control_dt_s,
episode_s, timestep, joint_names, actuator_names, ctrl_low, ctrl_high, observed_bodies,
perception_hz, scene_xml, max_command_step_frac, arm_prefixes, cameras) and, every 20 ms, the
observation (keys time, qpos, qvel, ctrl, objects, objects_stamp, images, depth, camera_stamp,
io). qpos and qvel follow joint_names; ctrl echoes the commands as accepted (a failed gripper still
echoes its command); images and depth hold overhead and robot/wrist_cam, updated twice a second with
camera_stamp; objects is empty; io holds rack (the rack type), cycle_limit_s and wrist_torque_nm.
The controller may use numpy, mujoco and the files in /app. Wall-time limits per call and per run are in
/app/gauntlet/harness.py.run_gauntlet.py runs them: 2 at T2, 6 at T3 (two per upset)
and 4 at T4 (two per fault), in the three layout bands of run_gauntlet.py --band. The groups are in
CELL_SHEET.md. Every run has its own rack type, rack place, tubes, loose caps and wrong slots, drawn by
task.py.CELL_SHEET.md: a cracked cap, a tube lifted by a loose cap, a tube tilted, dropped or on the bench, the orange
tube touched, the bench items moved, arm force, squeeze and joint limits, a tube left hanging in the gripper, a
controller error or wall-time limit, an abort when nothing failed) caps the run at the stages met before it, and
at 0.5.