PS-2 probe stow
harbor run -t reactive-labs/probe-stowharbor download reactive-labs/probe-stowHi,
Work order WO-2291 is for bench cell PS-2 in thermal bench room 2. We need a controller for the Panda that stows the reference temperature probe in its sleeve at the end of each comparison run. It has to pick the probe up off the bench and turn it tip-down. Then it lowers the probe into the 30 mm sleeve to within 10 mm of the floor without pressing on the walls (1 N limit), lets go and backs out. The sleeve's lift pad has a fault: it can trip just after the stow and raise the probe 20-32 mm. The controller has to notice that and push the probe back down gently before it reports done. It must not move the measuring cylinder or the sample jar, squeeze the handle harder than 15 N, or take more than 30 s. The only sensor on the items is the overhead RGB-D camera, and the bench hasn't been surveyed since the refit. If the gripper servo or the camera feed dies during a stow, the arm must stop where it is, keep hold of the probe and report which one failed.
Everything is in /app:
WORK_ORDER.md);CALIBRATION_SHEET.md);ATTEMPT_LOG.md);scene.xml, robot/);task.py, gauntlet/);python3 /app/run_gauntlet.py --controller /app/controller.py --tiers T0,T1,T2,T3,T4 --episodes 2.The motion-planning and sim-to-real skills we use are in /app/skills/.
Please write /app/controller.py with a Controller class (__init__(model_info), reset(obs), act(obs)).
model_info has control_dt_s, episode_s, timestep, joint_names, actuator_names, ctrl_low,
ctrl_high, observed_bodies (empty), perception_hz, scene_xml, max_command_step_frac and cameras
(name, width, height, depth, fovy_deg). obs has time, qpos and qvel (the arm and finger joints in
joint_names order; qpos has sensor noise and offsets), ctrl (the commands now applied), images["overhead"],
depth["overhead"] and camera_stamp; objects is empty and objects_stamp is None. act returns one
command per actuator, or {"status": "done"}, or {"status": "abort", "fault": ...}. The "Controller
interface" comment at the top of /app/gauntlet/gauntlet.py has the details. Don't change scene.xml,
task.py or robot/panda.xml.
Thanks, Thermal metrology, Fenmoor Calibration Laboratory
/app/controller.py. It runs in its own process, started by gauntlet/harness.py exactly as
run_gauntlet.py starts it: as user nobody, in an empty temporary working directory, with /app on its
import path. It receives only the model info and the observation dict. No item poses are given. It may use
numpy, mujoco and the files in /app, including the skills' motion planner.gauntlet/harness.py): 60 s to import the file and build the Controller, 20 s for any one
reset or act call, and 150 s of controller time in all per cycle. Breaking one ends the cycle as a
controller error. The whole acceptance run, simulation included, has 1500 s; cycles not finished by then
score 0, and no cycle is started after 1290 s.run_gauntlet.py runs a cycle, in an order that
is not given (the tiers are mixed). The tiers are the groups
in CALIBRATION_SHEET.md section 5, with exact ranges in gauntlet/gauntlet.py (TIER_RANGES):
camera_stamp; on the other
the image is frozen and the stamp still advances).task.py: POP_RISE_M,
POP_DELAY_S, PAD_HOLD_N, PAD_TRIP_M, Tracker._lift_pad). A trip gives the cycle until 10 s after
it, when that is later than 30 s. The pad also trips if the controller has already reported done, and the
cycle is judged after it.fault_triggers, fault_delay_s and fault_pattern in task.py), so normally with the probe held
part way down. No fault starts on a cycle where the probe never gets into the bore. If the probe is seated
and let go before the delay is over, the fault still starts at the drawn time. A fault that starts less
than 1 s before the controller reports done, or before the cycle's time is up, does not count: the cycle is
scored as one without a fault (fault_grace_s in task.py), and a correct abort is still accepted.task.py defines it: tip within 15 mm of the sleeve axis, at most 10 mm above the
sleeve floor height, and probe within 15 degrees of tip-down, all judged at the end, after release and
settling (so a probe left on a raised lift pad is not seated);WORK_ORDER.md was hit: probe against the sleeve walls over 1 N or against the bore floor
over 3 N, squeeze over 15 N, arm against the sleeve or the lift pad over 1 N, the measuring cylinder or
the sample jar moved over 10 mm, or an arm safety limit (line 9: contact over 60 N, impact over 300 N,
self-contact over 20 N, joint speed over 4 rad/s, a joint more than 0.02 rad past its limit);handled_ticks in
task.py). A probe let go in the air is counted until 0.25 s after it lands on the bore floor (at most 1 s
after the last touch), so dropping it in from any height is judged. What the probe does on its own after
that is not counted. Touching the probe again, for
example to push it down after a pop, is allowed and is counted in the same way. The arm against the sleeve
counts over the whole cycle.{"status": "abort", "fault": ...} within 3 s of the onset and no limit was hit, else 0. The arm stops
where it is. A probe in the gripper stays there, also when it is part way into the bore: do not pull it out
and do not let go. This is checked: at the end the probe must be in the gripper with its tip in the bore
(abort_state in task.py), unless it was already seated and let go when the fault started. An abort on the
first tick after the onset counts. After the abort the cell keeps the arm and the gripper on their last commands,
and the wall, floor and grip limits are still judged with the probe held. A dead gripper stays on the last
command it was following and ignores new ones.scene.xml, task.py and robot/panda.xml in /app must be unchanged.