AS-4 fixture changeover, product A to product B
harbor run -t reactive-labs/fixture-changeoverharbor download reactive-labs/fixture-changeoverHi,
Station AS-4 in our Harlow Vale assembly hall finishes its run of product A this week and has to come back up on product B without a fitter standing at it. It is an I2RT YAM arm with the linear gripper in front of a small fixture with a swing clamp, a changeover shelf, an infeed tray and an outfeed tray. Please write the controller that does the changeover and proves the station out: the arm takes product A's nest off the fixture and puts it away on the shelf, fits product B's nest in its place and clamps it, then runs two first-off parts from the infeed tray through the new nest and into the outfeed tray. When it reports done, nothing may be left on the station that does not belong to product B, and the arm must be clear of the fixture. The shelf also holds a nest for product C that looks much like B's, the infeed tray may still hold product A parts, and there are odds and ends on the bench that are not ours to move. The fixture, shelf and trays are bolted down for each run but never in quite the same place, and nothing reports where they are: the arm has an overhead camera with depth, a wrist camera and its joint readings. Things come loose during a changeover (a nest end lifts off its pin, a pressed part pops back up, the clamp springs back), and the controller has to notice and put it right. If the gripper or the camera fails it has to stop safely and say which one failed.
Everything is in /app:
REQUEST.md);CHANGEOVER_SHEET.md);PRODUCT_B.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 gripper) 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, Production engineer, Orrin & Pike Fittings
/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 actuator still echoes its command); images["overhead"],
depth["overhead"] and images["robot/wrist_cam"] update at 2 Hz with camera_stamp; objects is empty;
io holds product, first_off_parts and cycle_limit_s. The controller may use numpy, mujoco and the files
in /app. Wall-time limits are in /app/gauntlet/harness.py: 90 s of controller time per run and 1500 s for the whole
acceptance run on one CPU, of which the simulation takes about 0.25 s per simulated second. A run not finished by
then scores 0.run_gauntlet.py runs them: 2 at T2, 6 at T3 (each upset
twice) and 4 at T4 (2 with a dead gripper, 2 with a frozen camera). The groups are in CELL_SHEET.md. Each
group's runs are spread over the three layout bands of run_gauntlet.py --band.CELL_SHEET.md or PRODUCT_B.md exceeded, a part pressed in a nest that is not seated and clamped, an unpressed
part put in the outfeed tray, something dropped or put on the bench, a loose item moved, an arm limit), a controller error or wall-time limit, or an abort when nothing failed caps the run at the stages
finished before it, and at 0.5.CHANGEOVER_SHEET.md, Faults), and scores 0 if no stage was
done before the fault. Otherwise it scores 1.0 if the stages done at the fault are at least the stages due
by then, and otherwise the share of the nine stages done, as for a run without a fault. A crash after a fault scores 0.