reactive-labs-team commited on
Commit
d32ecb0
·
verified ·
1 Parent(s): 36d4004

Release workcell-manipulation: 15 tasks (part 9)

Browse files
tasks/power-shelf-service/instruction.md CHANGED
@@ -60,7 +60,7 @@ Facilities engineering lead, Corrie Bank Hosting
60
  - 0 for an arm safety stop, a controller error or an abort when nothing failed.
61
  - On a work order with a fault: 0 without the right `{"status": "abort", "fault": ...}` after the fault starts,
62
  with a shelf stop or an arm safety stop, or with no step done before the fault. Otherwise
63
- min(1, (steps done before the fault + 1) / (steps due + 1)), where steps due = floor(n x (fault time - 40 s) /
64
  90 s) for a work order of n steps. A fault that starts less than 1 s before the controller reports done is not
65
  counted, and the work order is scored as one without a fault.
66
  - Reward: mean work-order score. `scene.xml`, `task.py`, `gauntlet/` and `robot/` in `/app` must be unchanged.
 
60
  - 0 for an arm safety stop, a controller error or an abort when nothing failed.
61
  - On a work order with a fault: 0 without the right `{"status": "abort", "fault": ...}` after the fault starts,
62
  with a shelf stop or an arm safety stop, or with no step done before the fault. Otherwise
63
+ 1 if the steps done before the fault are at least the steps due, otherwise the steps done before the fault divided by the number of steps in the cycle (what a cycle without a fault pays), where steps due = floor(n x (fault time - 40 s) /
64
  90 s) for a work order of n steps. A fault that starts less than 1 s before the controller reports done is not
65
  counted, and the work order is scored as one without a fault.
66
  - Reward: mean work-order score. `scene.xml`, `task.py`, `gauntlet/` and `robot/` in `/app` must be unchanged.
tasks/power-shelf-service/tests/app_sha256.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "gauntlet/gauntlet.py": "f2b2801730b7ad093103e3afcdc80a15fa4f5d1ed8a0e2ecf9918adc56494e00",
3
- "gauntlet/harness.py": "118878e89e0d65207c4bdb76dd9f62e7f2de48fc18e565f93136c60be88f88b8",
4
  "robot/LICENSE": "a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9",
5
  "robot/assets/finger_0.obj": "215098c0fcdf7192f6c503a37cf49e3efecf8a9e1320f02b17c5584d89cc5b2c",
6
  "robot/assets/finger_1.obj": "cf239e9aca26bba09dbbf1c544c47d87cfc9a2f0637c8bb786af750b6d4eca44",
 
1
  {
2
  "gauntlet/gauntlet.py": "f2b2801730b7ad093103e3afcdc80a15fa4f5d1ed8a0e2ecf9918adc56494e00",
3
+ "gauntlet/harness.py": "6bdccc166a27d1bad4466032a62cef339d4cd890a4742d433f37db555dd26bb0",
4
  "robot/LICENSE": "a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9",
5
  "robot/assets/finger_0.obj": "215098c0fcdf7192f6c503a37cf49e3efecf8a9e1320f02b17c5584d89cc5b2c",
6
  "robot/assets/finger_1.obj": "cf239e9aca26bba09dbbf1c544c47d87cfc9a2f0637c8bb786af750b6d4eca44",
tasks/power-shelf-service/tests/world/gauntlet/harness.py CHANGED
@@ -221,7 +221,7 @@ def fault_episode_score(r: dict) -> float:
221
  """Score of a work order in which a T4 fault started.
222
 
223
  0 without the right abort, with a safety stop, or with no step done before the fault. Otherwise
224
- (steps done before the fault + 1) / (steps due by the fault + 1), at most 1, where the steps due are those a cell
225
  keeping pace would have done: floor(n * (fault time - FAULT_SETUP_S) / FAULT_PACE_S), between 0 and n, for a
226
  work order of n steps. Waiting for a fault and aborting earns nothing."""
227
  if not r.get("safe_pass"):
@@ -232,7 +232,7 @@ def fault_episode_score(r: dict) -> float:
232
  n = max(1, int((r.get("metrics") or {}).get("n_stages") or 1))
233
  t_fault = float(r.get("onset_s") or 0.0)
234
  due = max(0, min(n, math.floor(n * (t_fault - FAULT_SETUP_S) / FAULT_PACE_S)))
235
- return min(1.0, (met + 1) / (due + 1))
236
 
237
 
238
  def episode_score(r: dict) -> float:
 
221
  """Score of a work order in which a T4 fault started.
222
 
223
  0 without the right abort, with a safety stop, or with no step done before the fault. Otherwise
224
+ 1 if the steps done before the fault are at least the steps due by the fault, otherwise the steps done before the fault divided by the number of steps in the cycle (what a cycle without a fault pays), where the steps due are those a cell
225
  keeping pace would have done: floor(n * (fault time - FAULT_SETUP_S) / FAULT_PACE_S), between 0 and n, for a
226
  work order of n steps. Waiting for a fault and aborting earns nothing."""
227
  if not r.get("safe_pass"):
 
232
  n = max(1, int((r.get("metrics") or {}).get("n_stages") or 1))
233
  t_fault = float(r.get("onset_s") or 0.0)
234
  due = max(0, min(n, math.floor(n * (t_fault - FAULT_SETUP_S) / FAULT_PACE_S)))
235
+ return (1.0 if met >= due else met / n)
236
 
237
 
238
  def episode_score(r: dict) -> float:
tasks/press-fit/environment/world/ACCEPTANCE_TESTS.md CHANGED
@@ -32,8 +32,7 @@ public ranges, and part sizes and friction a quarter past their tolerance bands
32
  - A plate where a gripper or tracker fault started scores 0 unless the controller stops with
33
  `{"status": "abort", "fault": "dead_gripper" | "perception_freeze"}` naming the fault within 20 s of its start,
34
  with no safety stop during the cycle or after it. A controller error after the fault started scores 0. With the
35
- right abort the plate scores 0 if no stage was done before the fault, and otherwise (stages done before the
36
- fault + 1) / (stages due by the fault + 1), at most 1; the stages due are floor(8 x (fault time - 40 s) / 142 s),
37
  between 0 and 8. For this count a `depth` stage is done once the part has stood at its depth out of the fingers
38
  and is still there (a later touch to measure it does not undo it).
39
  - The plate is judged as it stands when the controller reports done or the cycle ends (150 s), after the arm has
 
32
  - A plate where a gripper or tracker fault started scores 0 unless the controller stops with
33
  `{"status": "abort", "fault": "dead_gripper" | "perception_freeze"}` naming the fault within 20 s of its start,
34
  with no safety stop during the cycle or after it. A controller error after the fault started scores 0. With the
35
+ right abort the plate scores 0 if no stage was done before the fault, and otherwise 1 if the stages done before the fault are at least the stages due by the fault, otherwise the stages done before the fault divided by the number of stages in the cycle (what a cycle without a fault pays); the stages due are floor(8 x (fault time - 40 s) / 142 s),
 
36
  between 0 and 8. For this count a `depth` stage is done once the part has stood at its depth out of the fingers
37
  and is still there (a later touch to measure it does not undo it).
38
  - The plate is judged as it stands when the controller reports done or the cycle ends (150 s), after the arm has
tasks/press-fit/environment/world/gauntlet/harness.py CHANGED
@@ -219,8 +219,7 @@ def fault_episode_score(r: dict) -> float:
219
  """Score of an episode in which a T4 fault started.
220
 
221
  0 without the right abort within the deadline, with a safety stop, or with no stage done before the fault. With
222
- the right abort and at least one stage done, (stages done before the fault + 1) / (stages due by the fault + 1),
223
- at most 1, where the stages due are the stages a cell keeping cycle-budget pace after the grace would have done
224
  by then: floor(n * (fault time - grace) / cycle budget), between 0 and n. Here n = 8 (start and depth for each of
225
  the four lines), grace 40 s, budget 142 s. No fault starts before grace + budget / n (57.75 s), so at least one
226
  stage is due whenever a fault fires. Waiting for the fault, or holding a part until it comes, earns nothing.
@@ -237,7 +236,7 @@ def fault_episode_score(r: dict) -> float:
237
  r["onset_due"] = due
238
  if met <= 0:
239
  return 0.0
240
- return min(1.0, (met + 1) / (due + 1))
241
 
242
 
243
  def episode_report(r: dict) -> dict:
 
219
  """Score of an episode in which a T4 fault started.
220
 
221
  0 without the right abort within the deadline, with a safety stop, or with no stage done before the fault. With
222
+ the right abort and at least one stage done, 1 if the stages done before the fault are at least the stages due by the fault, otherwise the stages done before the fault divided by the number of stages in the cycle (what a cycle without a fault pays), where the stages due are the stages a cell keeping cycle-budget pace after the grace would have done
 
223
  by then: floor(n * (fault time - grace) / cycle budget), between 0 and n. Here n = 8 (start and depth for each of
224
  the four lines), grace 40 s, budget 142 s. No fault starts before grace + budget / n (57.75 s), so at least one
225
  stage is due whenever a fault fires. Waiting for the fault, or holding a part until it comes, earns nothing.
 
236
  r["onset_due"] = due
237
  if met <= 0:
238
  return 0.0
239
+ return (1.0 if met >= due else met / n)
240
 
241
 
242
  def episode_report(r: dict) -> dict: