Skip to content

The first exam for code agents in the physical world: frozen robot tasks from many benchmark suites, each answered with a program and verified in a separate sandbox. Runs on Harbor.

BEHAVIOR-1K: a fall ends the episode as a failure (OmniGibson's Falling rule held for 10 s), both modes (#127)

Qineng Wang39284dd72ee9
diff --git a/docs/benchmarks/behavior.md b/docs/benchmarks/behavior.md
index 22f06fd72e..294a9284fa 100644
--- a/docs/benchmarks/behavior.md
+++ b/docs/benchmarks/behavior.md
@@ -37,7 +37,8 @@ supplementary tasks for harder testing (50 on 2026-10-04, 16 and 23 on 2026-10-0
`scripts/behavior/goal.py` words each BDDL predicate a goal uses, with OmniGibson's thresholds. Agent results are not
in the repository (PROTOCOL D3): the positives are cited by trial id, results-site log and Hugging Face replay.
- The predicate is the task's official BDDL goal (OmniGibson object states), checked at every control step; the episode
- ends the moment it holds. The challenge's timeout is lifted to a runaway guard (time is the budget, not steps).
+ ends the moment it holds, and as a failure when the robot has fallen over (§ Falls). The challenge's timeout is lifted to
+ a runaway guard (time is the budget, not steps).
- Frozen instance: the full simulator state after the challenge's own instance load (`Evaluator.load_task_instance`) and
its hash, in `environment/`, `tests/` and the standard sidecar. Another host may rebuild it within the pose tolerance but
not bit-exactly (`instance_exact = 0`, `instance_ok = 1`); grading needs `instance_ok`.
@@ -209,6 +210,37 @@ container, outside Harbor's lifecycle. A cache can reach ~10 GB (one probe volum
deterministic`, `live_matches_replay` reported separately. OmniGibson declares rollouts nondeterministic; measured so
far, a live run and its fresh replay agree.
+## Falls (2026-10-09, owner decision)
+The episode ends, as a failure, when the robot has fallen over: OmniGibson's own `Falling` termination condition
+(`omnigibson/termination_conditions/falling.py`; OmniGibson's navigation tasks use it, `BehaviorTask` has only `Timeout`
+and `PredicateGoal`) with its defaults, on the pose it reads (`robot.get_position_orientation()`, the R1Pro's `base_link`):
+the base more than 0.03 m below the floor, or its up axis tilted more than 41.4° from vertical (z < 0.75), holding for 300
+consecutive control steps (10 s of simulated time). It runs inside the tooling's `Session.step()` (`FALL_*`, `FallWatch`),
+so the privileged session, the standard service and every fresh-process replay apply it at the same control step; a success
+on the same step stands.
+- **Standard:** `reason` "failure: the robot fell over"; `/spec` `episode` states the end conditions; `reward.json`
+ `task_failure`. **Privileged:** `Session.status()["fallen"]` and `s.episode_done` (`s.reset()` starts again); the
+ verifier's replays end at the same step (`reward.json` `fallen`).
+- The R1Pro's base hangs from an upright world-fixed root through six virtual joints (x, y, z, rx, ry, rz; rx and ry
+ undriven), so the up axis's z is also cos(rx)·cos(ry) of `base_footprint_rx_joint` / `_ry_joint`, columns the standard
+ proprioception always had (checked against the `base_link` quaternion to 1e-6 on 16,973 logged rows).
+- **Why the hold:** a short topple that is over within seconds (driving, bumping into furniture) never counts; the longest
+ recorded lasted 4.3 s.
+- **What it decides:** in OmniGibson a toppled R1Pro can sometimes be righted. In the eight recorded standard-mode runs
+ with the robot's proprioception (saved or printed by the agent; rcb-limited/2.0 and 2.2, 2026-09-25..30) five toppled
+ past 41°, 14 times: 12 topples ended upright again (up to 145°): eight within 4.3 s of simulated time, four after the
+ agent levered the robot up with an arm against the floor over 32-114 s; two lasted until the 4 h limit. None of the eight
+ runs succeeded; with the rule three of them would have ended 2.3-3.4 h early, two of them after a topple the agent later
+ recovered from. The rule is the benchmark's decision that a robot which has fallen over has failed, as in OmniGibson's
+ navigation tasks and on the real robot, not a claim that recovery is impossible in the simulator. The scene, the frozen
+ instances and the BDDL goals are unchanged, so the tasks keep their names (owner decision, as for HumanoidBench's and
+ MyoSuite's reset budgets); results recorded before this change are reported separately.
+- Measured on ws (RTX 4090, 2026-10-09) through the task's own Session, with OmniGibson's `Falling._step` evaluated on the
+ same state at every step (12,036 control steps, all in agreement): a standard agent's recorded rows that toppled the robot
+ ended the episode exactly 300 control steps after the topple began (on its side, 94.7°); the reference rows never came
+ near the threshold (putting_shoes_on_rack at most 21.7°, p99.9 17.3°; picking_up_trash at most 7.5°); the rule costs
+ 0.06 ms of a 47-60 ms control step.
+
## Standard mode (eai-standard/2.2)
`joint_position` (25: base per-step targets in the robot frame, trunk, arms, grippers; base and grippers switch at the
row) and `ee_pose` (16, left first, xyzw, cuRobo IK for both end effectors per row, base still); the head camera and two
diff --git a/scripts/behavior/mk_tasks.py b/scripts/behavior/mk_tasks.py
index 6270a6da99..4277ce75cf 100755
--- a/scripts/behavior/mk_tasks.py
+++ b/scripts/behavior/mk_tasks.py
@@ -116,6 +116,8 @@ SIDECAR = (
"(Isaac: only the first replay in a process is bit-exact, and two simulators do not fit in one container) and writes\n"
"`final.json`; the verifier runs in a separate sandbox (`tests/Dockerfile`) over those artifacts.")
# The README Change Log (PROTOCOL §2.8: published tasks fixed in place), per mode, oldest first.
+FALL = ("OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) "
+ "has held for 10 s of simulated time") # the tooling's FALL_* (docs/benchmarks/behavior.md, Falls)
REPLAY_LIMIT = "min(4 h, max(3600 s, 1200 s + steps / 2))" # tests/grade.py replay_timeout(), per fresh-process replay
MEASURED = ("measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than "
"3.5 control steps/s")
@@ -124,12 +126,21 @@ CHANGES = {
f"2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays {REPLAY_LIMIT} "
f"instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), {MEASURED}, so long trajectories "
"hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its "
- "name; a trial graded before this date with `grader_error` = 1 can be regraded."],
+ "name; a trial graded before this date with `grader_error` = 1 can be regraded.",
+ f"2026-10-09: a fall ends the episode as a failure (owner decision): once {FALL}, the tooling Session's episode ends "
+ "(`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` "
+ "`fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which "
+ "the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported "
+ "separately."],
"standard": [
"2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end "
f"(up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of {REPLAY_LIMIT}) "
f"plus 30 min; {MEASURED}. The replays still have no limit of their own. The scene, frozen instance and pass rule are "
- "unchanged, so the task keeps its name."],
+ "unchanged, so the task keeps its name.",
+ f"2026-10-09: a fall ends the episode as a failure (owner decision): once {FALL}, the service ends the episode with "
+ "reason \"failure: the robot fell over\"; `/spec` `episode` states the end conditions and `reward.json` adds "
+ "`task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded "
+ "before this change are reported separately."],
}
diff --git a/scripts/behavior/tests/test_fall.py b/scripts/behavior/tests/test_fall.py
new file mode 100644
index 0000000000..962c56d4cc
--- /dev/null
+++ b/scripts/behavior/tests/test_fall.py
@@ -0,0 +1,209 @@
+"""Unit tests of BEHAVIOR-1K's fall rule (the tooling's up_z / FallWatch, OmniGibson's Falling held for FALL_HOLD_STEPS)
+on synthetic poses: no simulator, no GPU.
+
+ python3 -m unittest discover -s scripts/behavior/tests # needs numpy (the tooling imports it)
+
+The tooling source is the template twin's environment/rcb_behavior.py, which the generator copies into every task.
+"""
+from __future__ import annotations
+
+import importlib.util
+import math
+import os
+import random
+import sys
+import unittest
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[3]
+TOOL = ROOT / "tasks" / "behavior-picking-up-trash-i00-privileged" / "environment" / "rcb_behavior.py"
+sys.dont_write_bytecode = True
+os.environ["RCB_SESSION_LOG"] = "" # the tooling's interaction log: off in tests
+os.environ["RCB_SESSION_LOG_KEEP"] = ""
+_spec = importlib.util.spec_from_file_location("rcb_behavior_under_test", TOOL)
+M = importlib.util.module_from_spec(_spec)
+_spec.loader.exec_module(M)
+
+
+def qmul(a, b):
+ ax, ay, az, aw = a
+ bx, by, bz, bw = b
+ return (aw * bx + ax * bw + ay * bz - az * by, aw * by - ax * bz + ay * bw + az * bx,
+ aw * bz + ax * by - ay * bx + az * bw, aw * bw - ax * bx - ay * by - az * bz)
+
+
+def axis_quat(axis, angle):
+ s = math.sin(angle / 2.0)
+ return (axis[0] * s, axis[1] * s, axis[2] * s, math.cos(angle / 2.0))
+
+
+def base_quat(rx, ry, rz, root_yaw=0.0):
+ """The R1Pro's base_link: an upright world-fixed root (any yaw), then the virtual joints rx, ry, rz in chain order."""
+ q = axis_quat((0, 0, 1), root_yaw)
+ for axis, ang in (((1, 0, 0), rx), ((0, 1, 0), ry), ((0, 0, 1), rz)):
+ q = qmul(q, axis_quat(axis, ang))
+ return q
+
+
+def rotated_up_z(q):
+ x, y, z, w = q
+ return qmul(qmul(q, (0.0, 0.0, 1.0, 0.0)), (-x, -y, -z, w))[2]
+
+
+def tilted(deg, axis="ry"):
+ a = math.radians(deg)
+ return M.up_z(base_quat(a if axis == "rx" else 0.0, a if axis == "ry" else 0.0, 0.4))
+
+
+class UpZ(unittest.TestCase):
+ def test_upstream_defaults(self):
+ # OmniGibson 3.9.2 Falling(fall_height=0.03, topple=True, tilt_tolerance=0.75); 10 s at 30 Hz
+ self.assertEqual((M.FALL_HEIGHT_M, M.FALL_TILT_TOLERANCE, M.FALL_HOLD_STEPS), (0.03, 0.75, 300))
+ self.assertAlmostEqual(math.degrees(math.acos(M.FALL_TILT_TOLERANCE)), 41.41, places=2)
+ self.assertTrue(M.FALL_REASON.startswith("failure: "))
+
+ def test_matches_rotation_and_virtual_joints(self):
+ rng = random.Random(0)
+ for _ in range(2000):
+ rx, ry, rz, yaw = (rng.uniform(-math.pi, math.pi) for _ in range(4))
+ q = base_quat(rx, ry, rz, root_yaw=yaw)
+ self.assertAlmostEqual(M.up_z(q), rotated_up_z(q), places=10)
+ self.assertAlmostEqual(M.up_z(q), math.cos(rx) * math.cos(ry), places=10)
+
+ def test_yaw_only_and_scaling(self):
+ self.assertAlmostEqual(M.up_z(base_quat(0, 0, 2.5, root_yaw=-1.0)), 1.0, places=12)
+ q = base_quat(0.3, -0.5, 1.0)
+ self.assertAlmostEqual(M.up_z([2.0 * v for v in q]), M.up_z(q), places=12)
+ self.assertTrue(math.isnan(M.up_z((0, 0, 0, 0))))
+
+
+class Falling(unittest.TestCase):
+ def test_tilt_threshold(self):
+ for axis in ("rx", "ry"):
+ for deg, want in ((0, False), (20, False), (41.0, False), (41.8, True), (63, True), (93, True), (145, True), (180, True)):
+ self.assertEqual(M.FallWatch.falling(0.005, tilted(deg, axis)), want, (axis, deg))
+
+ def test_below_floor(self):
+ self.assertFalse(M.FallWatch.falling(0.005, 1.0)) # the R1Pro's base_link at rest
+ self.assertFalse(M.FallWatch.falling(-0.029, 1.0))
+ self.assertTrue(M.FallWatch.falling(-0.031, 1.0))
+ self.assertTrue(M.FallWatch.falling(0.55, 1.0, floor_z=0.6))
+
+ def test_nan_never_counts(self):
+ self.assertFalse(M.FallWatch.falling(float("nan"), float("nan")))
+
+
+class Hold(unittest.TestCase):
+ def test_hold_reached_on_the_300th_step(self):
+ w = M.FallWatch()
+ for i in range(299):
+ self.assertFalse(w.update(0.23, tilted(63)), i)
+ self.assertTrue(w.update(0.23, tilted(63)))
+ self.assertEqual(w.fallen_step, 300)
+
+ def test_self_righting_topples_never_count(self):
+ w = M.FallWatch()
+ for deg, steps in ((81.3, 99), (61.3, 128), (50.2, 95), (60.3, 12)): # short topples recorded in agent runs
+ for _ in range(steps):
+ w.update(0.3, tilted(deg))
+ w.update(0.005, 1.0)
+ self.assertFalse(w.fallen)
+ self.assertEqual(w.run, 0)
+
+ def test_latched_until_reset(self):
+ w = M.FallWatch(hold=2)
+ w.update(0.2, tilted(90)); w.update(0.2, tilted(90))
+ self.assertTrue(w.fallen)
+ self.assertTrue(w.update(0.005, 1.0))
+ w.reset()
+ self.assertEqual((w.fallen, w.run, w.fallen_step, w.steps), (False, 0, None, 0))
+
+ def test_upright_robot_never_falls(self):
+ rng = random.Random(1)
+ w = M.FallWatch(hold=1)
+ for _ in range(20000): # tilted up to 40 deg in any direction, the base up to 0.3 m high
+ a, b = rng.uniform(-0.45, 0.45), rng.uniform(-0.45, 0.45)
+ if math.degrees(math.acos(math.cos(a) * math.cos(b))) <= 40.0:
+ w.update(rng.uniform(-0.02, 0.3), M.up_z(base_quat(a, b, rng.uniform(-3, 3))))
+ self.assertFalse(w.fallen)
+
+
+class _T:
+ """The few torch tensor methods Session.step uses, on numpy."""
+ def __init__(self, x):
+ import numpy as np
+ self.x = np.asarray(x)
+ def flatten(self):
+ return _T(self.x.reshape(-1))
+ def numel(self):
+ return int(self.x.size)
+ def clone(self):
+ return _T(self.x.copy())
+ def tolist(self):
+ return self.x.tolist()
+
+ def __getitem__(self, i):
+ return self.x[i]
+
+
+class SessionStep(unittest.TestCase):
+ """Session.step's order on a scripted simulator: the BDDL goal first, then the fall rule; either ends the episode."""
+
+ def session(self, poses, goal_at=None):
+ import types
+ s = object.__new__(M.Session)
+ steps = {"n": 0}
+
+ def ev_step():
+ steps["n"] += 1
+ return (goal_at is not None and steps["n"] >= goal_at), False
+
+ def pose():
+ pos, quat = poses[min(steps["n"], len(poses)) - 1]
+ return _T(pos), _T(quat)
+ s.th = types.SimpleNamespace(as_tensor=_T)
+ s.action_dim, s.task = 25, "picking_up_trash"
+ s.ev = types.SimpleNamespace(step=ev_step)
+ s.env = types.SimpleNamespace(episode_steps=0)
+ s.robot = types.SimpleNamespace(get_position_orientation=pose)
+ s._policy = types.SimpleNamespace(next=None)
+ s._recording, s._stepped, s._last_action, s.episode_done = None, False, None, False
+ s._fall, s.end_reason = M.FallWatch(hold=5), None
+ return s
+
+ def run_steps(self, s, n):
+ ends = []
+ for _ in range(n):
+ term, trunc = s.step([0.0] * 25)
+ ends.append(bool(term or trunc))
+ if term or trunc:
+ break
+ return ends
+
+ def test_fall_ends_the_episode_after_the_hold(self):
+ lying = ((0.0, 0.0, 0.25), base_quat(0.0, math.radians(93), 0.0))
+ s = self.session([((0, 0, 0.005), (0, 0, 0, 1))] * 3 + [lying] * 20)
+ ends = self.run_steps(s, 20)
+ self.assertEqual(len(ends), 3 + 5) # upright 3 steps, then the 5-step hold
+ self.assertTrue(s.episode_done and s._fall.fallen)
+ self.assertEqual(s.end_reason, M.FALL_REASON)
+ with self.assertRaisesRegex(M.PrimitiveError, "fell over"):
+ s.step([0.0] * 25)
+
+ def test_goal_on_the_same_step_wins(self):
+ lying = ((0.0, 0.0, 0.25), base_quat(math.radians(70), 0.0, 0.0))
+ s = self.session([lying] * 10, goal_at=5) # the goal holds on the step the hold would be reached
+ self.assertEqual(len(self.run_steps(s, 10)), 5)
+ self.assertTrue(s.episode_done)
+ self.assertIsNone(s.end_reason) # ended by the goal, not by the fall
+ self.assertFalse(s._fall.fallen)
+
+ def test_wobble_does_not_end(self):
+ up, down = ((0, 0, 0.005), (0, 0, 0, 1)), ((0, 0, 0.3), base_quat(math.radians(80), 0.0, 0.0))
+ s = self.session(([down] * 4 + [up]) * 6)
+ self.assertEqual(self.run_steps(s, 30), [False] * 30)
+ self.assertFalse(s.episode_done)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tasks/behavior-assembling-gift-baskets-i00-privileged/README.md b/tasks/behavior-assembling-gift-baskets-i00-privileged/README.md
index 5988086051..0e290cb297 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-privileged/README.md
+++ b/tasks/behavior-assembling-gift-baskets-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-assembling-gift-baskets-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-assembling-gift-baskets-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-assembling-gift-baskets-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-assembling-gift-baskets-i00-privileged/instruction.md b/tasks/behavior-assembling-gift-baskets-i00-privileged/instruction.md
index f641b9605d..d3e3d895d6 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-privileged/instruction.md
+++ b/tasks/behavior-assembling-gift-baskets-i00-privileged/instruction.md
@@ -70,7 +70,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -90,7 +90,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/grade.py b/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/grade.py
+++ b/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-assembling-gift-baskets-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-assembling-gift-baskets-i00-standard/README.md b/tasks/behavior-assembling-gift-baskets-i00-standard/README.md
index 9d28e724a0..ab5b56b842 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-standard/README.md
+++ b/tasks/behavior-assembling-gift-baskets-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/server.py b/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-assembling-gift-baskets-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-assembling-gift-baskets-i00-standard/instruction.md b/tasks/behavior-assembling-gift-baskets-i00-standard/instruction.md
index c076433a2a..af1869b67c 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-standard/instruction.md
+++ b/tasks/behavior-assembling-gift-baskets-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Assemble four gift baskets in the living room. The four wicker baskets stand on the floor; four candles, four butter cookies, four pieces of Swiss cheese and four bows lie on the table. Put one candle, one butter cookie, one piece of Swiss cheese and one bow into each basket. Success means all of the following hold at the same time: (1) each wicker basket holds a different candle: one candle per basket; (2) each basket holds a different butter cookie: one cookie per basket; (3) each basket holds a different piece of Swiss cheese: one piece per basket; (4) each basket holds a different bow: one bow per basket. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-assembling-gift-baskets-i00-standard/tests/grade.py b/tasks/behavior-assembling-gift-baskets-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-assembling-gift-baskets-i00-standard/tests/grade.py
+++ b/tasks/behavior-assembling-gift-baskets-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/README.md b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/README.md
index ab93508c9a..5666368da7 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/README.md
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/instruction.md b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/instruction.md
index e3ec2b1748..e92151a3e5 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/instruction.md
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/instruction.md
@@ -48,7 +48,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -68,7 +68,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/grade.py b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/grade.py
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/README.md b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/README.md
index 637ad6fd3f..059f24702b 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/README.md
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/server.py b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/instruction.md b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/instruction.md
index 8a6e4a19bd..63fff4a447 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/instruction.md
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Attach the digital camera to the camera tripod. Both lie on the bedroom floor. Success means all of the following hold at the same time: (1) the digital camera is attached to the camera tripod. How the simulator judges them: attached(A, B): A is fixed to B through their attachment points; the joint forms by itself when A's attachment point is brought within 5 cm and 15° of a compatible one on B. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/tests/grade.py b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/tests/grade.py
+++ b/tasks/behavior-attach-a-camera-to-a-tripod-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/README.md b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/README.md
index d8764d52da..f51805d393 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/README.md
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/instruction.md b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/instruction.md
index d2f359c447..ac65cd6bed 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/instruction.md
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/grade.py b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/grade.py
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-standard/README.md b/tasks/behavior-boxing-books-up-for-storage-i00-standard/README.md
index 59e3eb98e2..55a0a7ed54 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-standard/README.md
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/server.py b/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-standard/instruction.md b/tasks/behavior-boxing-books-up-for-storage-i00-standard/instruction.md
index 19e41a084c..13e153ac26 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-standard/instruction.md
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Box up the books for storage. Six books stand in the four bookcases of the living room, and an empty box stands on the living-room floor; put all six books inside the box. Success means all of the following hold at the same time: (1) every book is inside the box. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-boxing-books-up-for-storage-i00-standard/tests/grade.py b/tasks/behavior-boxing-books-up-for-storage-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-boxing-books-up-for-storage-i00-standard/tests/grade.py
+++ b/tasks/behavior-boxing-books-up-for-storage-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-privileged/README.md b/tasks/behavior-boxing-food-after-dinner-i00-privileged/README.md
index 8d9ac6650c..5018fbb861 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-privileged/README.md
+++ b/tasks/behavior-boxing-food-after-dinner-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-boxing-food-after-dinner-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-boxing-food-after-dinner-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-privileged/instruction.md b/tasks/behavior-boxing-food-after-dinner-i00-privileged/instruction.md
index 9fcb04b1f5..0bd32f6073 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-privileged/instruction.md
+++ b/tasks/behavior-boxing-food-after-dinner-i00-privileged/instruction.md
@@ -62,7 +62,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -82,7 +82,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/grade.py b/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/grade.py
+++ b/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-boxing-food-after-dinner-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-standard/README.md b/tasks/behavior-boxing-food-after-dinner-i00-standard/README.md
index 7ca72c3c5a..0eaf885606 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-standard/README.md
+++ b/tasks/behavior-boxing-food-after-dinner-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/server.py b/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-boxing-food-after-dinner-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-standard/instruction.md b/tasks/behavior-boxing-food-after-dinner-i00-standard/instruction.md
index c03f86a86a..f8b07e65ef 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-standard/instruction.md
+++ b/tasks/behavior-boxing-food-after-dinner-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Box up the leftovers. Two tacos lie on two plates on the kitchen countertop and an empty tupperware is inside a kitchen cabinet; put both tacos into the tupperware, the tupperware into the refrigerator, and both plates into the sink, and leave the refrigerator closed. Success means all of the following hold at the same time: (1) both tacos are inside the tupperware; (2) both plates are on top of the sink; (3) the tupperware is inside the refrigerator; (4) the refrigerator is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-boxing-food-after-dinner-i00-standard/tests/grade.py b/tasks/behavior-boxing-food-after-dinner-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-boxing-food-after-dinner-i00-standard/tests/grade.py
+++ b/tasks/behavior-boxing-food-after-dinner-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-bringing-in-wood-i00-privileged/README.md b/tasks/behavior-bringing-in-wood-i00-privileged/README.md
index 89a5eb5696..02544288ca 100644
--- a/tasks/behavior-bringing-in-wood-i00-privileged/README.md
+++ b/tasks/behavior-bringing-in-wood-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-bringing-in-wood-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-bringing-in-wood-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-in-wood-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-bringing-in-wood-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-in-wood-i00-privileged/instruction.md b/tasks/behavior-bringing-in-wood-i00-privileged/instruction.md
index 29d8485bb8..c9cf03185e 100644
--- a/tasks/behavior-bringing-in-wood-i00-privileged/instruction.md
+++ b/tasks/behavior-bringing-in-wood-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-bringing-in-wood-i00-privileged/tests/grade.py b/tasks/behavior-bringing-in-wood-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-bringing-in-wood-i00-privileged/tests/grade.py
+++ b/tasks/behavior-bringing-in-wood-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-bringing-in-wood-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-bringing-in-wood-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-in-wood-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-bringing-in-wood-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-in-wood-i00-standard/README.md b/tasks/behavior-bringing-in-wood-i00-standard/README.md
index 736aae957c..29f716287b 100644
--- a/tasks/behavior-bringing-in-wood-i00-standard/README.md
+++ b/tasks/behavior-bringing-in-wood-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/server.py b/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-bringing-in-wood-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-bringing-in-wood-i00-standard/instruction.md b/tasks/behavior-bringing-in-wood-i00-standard/instruction.md
index 7d558cd205..fa378838fd 100644
--- a/tasks/behavior-bringing-in-wood-i00-standard/instruction.md
+++ b/tasks/behavior-bringing-in-wood-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Bring the wood in. Three sheets of plywood lie on the ground in the garden; put all three on the corridor floor. Success means all of the following hold at the same time: (1) every plywood sheet is on top of the corridor floor. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-bringing-in-wood-i00-standard/tests/grade.py b/tasks/behavior-bringing-in-wood-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-bringing-in-wood-i00-standard/tests/grade.py
+++ b/tasks/behavior-bringing-in-wood-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/README.md b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/README.md
index c5fde71973..6c746e345f 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/README.md
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/instruction.md b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/instruction.md
index 374f792a60..429b0502f8 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/instruction.md
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/instruction.md
@@ -55,7 +55,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -75,7 +75,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/grade.py b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/grade.py
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-standard/README.md b/tasks/behavior-bringing-paper-to-recycling-i00-standard/README.md
index 291d5067b7..8fed973b22 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-standard/README.md
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/server.py b/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-standard/instruction.md b/tasks/behavior-bringing-paper-to-recycling-i00-standard/instruction.md
index 1e89ae2a1a..1c0933c1b4 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-standard/instruction.md
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Take the paper out to recycling. A sack stands on the kitchen floor and a newspaper lies on the kitchen countertop; put both inside the recycling bin that stands on the garden floor, and close the bin. Success means all of the following hold at the same time: (1) the sack is inside the recycling bin; (2) the newspaper is inside the recycling bin; (3) the recycling bin is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-bringing-paper-to-recycling-i00-standard/tests/grade.py b/tasks/behavior-bringing-paper-to-recycling-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-bringing-paper-to-recycling-i00-standard/tests/grade.py
+++ b/tasks/behavior-bringing-paper-to-recycling-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-bringing-water-i00-privileged/README.md b/tasks/behavior-bringing-water-i00-privileged/README.md
index a873b2ec7e..a069b72420 100644
--- a/tasks/behavior-bringing-water-i00-privileged/README.md
+++ b/tasks/behavior-bringing-water-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-bringing-water-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-bringing-water-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-water-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-bringing-water-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-water-i00-privileged/instruction.md b/tasks/behavior-bringing-water-i00-privileged/instruction.md
index 50c4c73514..0912c642e7 100644
--- a/tasks/behavior-bringing-water-i00-privileged/instruction.md
+++ b/tasks/behavior-bringing-water-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-bringing-water-i00-privileged/tests/grade.py b/tasks/behavior-bringing-water-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-bringing-water-i00-privileged/tests/grade.py
+++ b/tasks/behavior-bringing-water-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-bringing-water-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-bringing-water-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-water-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-bringing-water-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-water-i00-standard/README.md b/tasks/behavior-bringing-water-i00-standard/README.md
index c57caf3e79..b181376cb9 100644
--- a/tasks/behavior-bringing-water-i00-standard/README.md
+++ b/tasks/behavior-bringing-water-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-bringing-water-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-bringing-water-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-bringing-water-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-bringing-water-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-bringing-water-i00-standard/environment/sim/server.py b/tasks/behavior-bringing-water-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-bringing-water-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-bringing-water-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-bringing-water-i00-standard/instruction.md b/tasks/behavior-bringing-water-i00-standard/instruction.md
index bd06738e68..86913a53d9 100644
--- a/tasks/behavior-bringing-water-i00-standard/instruction.md
+++ b/tasks/behavior-bringing-water-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Take both bottles out of the kitchen refrigerator, put them on the coffee table in the living room, and leave the refrigerator closed. Success means all of the following hold at the same time: (1) both bottles are on top of the living-room coffee table; (2) the refrigerator is closed. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-bringing-water-i00-standard/tests/grade.py b/tasks/behavior-bringing-water-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-bringing-water-i00-standard/tests/grade.py
+++ b/tasks/behavior-bringing-water-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-can-meat-i00-privileged/README.md b/tasks/behavior-can-meat-i00-privileged/README.md
index 66f7ddfef7..e7b98c4cb0 100644
--- a/tasks/behavior-can-meat-i00-privileged/README.md
+++ b/tasks/behavior-can-meat-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-can-meat-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-can-meat-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-can-meat-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-can-meat-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-can-meat-i00-privileged/instruction.md b/tasks/behavior-can-meat-i00-privileged/instruction.md
index 412d1325f9..c250bf50f1 100644
--- a/tasks/behavior-can-meat-i00-privileged/instruction.md
+++ b/tasks/behavior-can-meat-i00-privileged/instruction.md
@@ -72,7 +72,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -92,7 +92,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-can-meat-i00-privileged/tests/grade.py b/tasks/behavior-can-meat-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-can-meat-i00-privileged/tests/grade.py
+++ b/tasks/behavior-can-meat-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-can-meat-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-can-meat-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-can-meat-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-can-meat-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-can-meat-i00-standard/README.md b/tasks/behavior-can-meat-i00-standard/README.md
index 6b8cd34ca2..b293f93c09 100644
--- a/tasks/behavior-can-meat-i00-standard/README.md
+++ b/tasks/behavior-can-meat-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-can-meat-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-can-meat-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-can-meat-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-can-meat-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-can-meat-i00-standard/environment/sim/server.py b/tasks/behavior-can-meat-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-can-meat-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-can-meat-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-can-meat-i00-standard/instruction.md b/tasks/behavior-can-meat-i00-standard/instruction.md
index 9b7a8c8913..6242110edc 100644
--- a/tasks/behavior-can-meat-i00-standard/instruction.md
+++ b/tasks/behavior-can-meat-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Can the sausages. The four cooked bratwursts lie on the chopping board on the kitchen countertop, and the two hinged jars are inside the kitchen cabinet. Put exactly two bratwursts into each jar, close both jars, have both jars inside that cabinet at the end, and leave the cabinet closed. Success means all of the following hold at the same time: (1) each hinged jar holds exactly two of the four bratwursts inside it; (2) both jars are closed; (3) both jars are inside the cabinet; (4) the cabinet is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-can-meat-i00-standard/tests/grade.py b/tasks/behavior-can-meat-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-can-meat-i00-standard/tests/grade.py
+++ b/tasks/behavior-can-meat-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-canning-food-i00-privileged/README.md b/tasks/behavior-canning-food-i00-privileged/README.md
index a773e5f406..b50c16e515 100644
--- a/tasks/behavior-canning-food-i00-privileged/README.md
+++ b/tasks/behavior-canning-food-i00-privileged/README.md
@@ -47,3 +47,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-canning-food-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-canning-food-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-canning-food-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-canning-food-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-canning-food-i00-privileged/instruction.md b/tasks/behavior-canning-food-i00-privileged/instruction.md
index 14c3d0f289..243f4dd8f3 100644
--- a/tasks/behavior-canning-food-i00-privileged/instruction.md
+++ b/tasks/behavior-canning-food-i00-privileged/instruction.md
@@ -87,7 +87,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -107,7 +107,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-canning-food-i00-privileged/tests/grade.py b/tasks/behavior-canning-food-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-canning-food-i00-privileged/tests/grade.py
+++ b/tasks/behavior-canning-food-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-canning-food-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-canning-food-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-canning-food-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-canning-food-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-canning-food-i00-standard/README.md b/tasks/behavior-canning-food-i00-standard/README.md
index a88eb007be..51d74e3b87 100644
--- a/tasks/behavior-canning-food-i00-standard/README.md
+++ b/tasks/behavior-canning-food-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-canning-food-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-canning-food-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-canning-food-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-canning-food-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-canning-food-i00-standard/environment/sim/server.py b/tasks/behavior-canning-food-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-canning-food-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-canning-food-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-canning-food-i00-standard/instruction.md b/tasks/behavior-canning-food-i00-standard/instruction.md
index 750fec9799..a9658a1666 100644
--- a/tasks/behavior-canning-food-i00-standard/instruction.md
+++ b/tasks/behavior-canning-food-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Can the food in the kitchen. The steak and the pineapple are inside the refrigerator, two bowls are inside a kitchen cabinet, and a carving knife lies on the chopping board on the countertop. Dice the steak and the pineapple, fill one bowl with diced steak only and the other with diced pineapple only, put both bowls back inside that cabinet, and leave the refrigerator and the cabinet closed. Success means all of the following hold at the same time: (1) diced steak and diced pineapple exist (the steak and the pineapple have been diced); (2) one bowl is filled with diced steak and contains no diced pineapple; (3) a bowl is filled with diced pineapple and contains no diced steak (so it is the other bowl); (4) both bowls are inside the cabinet; (5) the refrigerator and the cabinet are closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. contains(A, S): at least one particle of the substance S lies inside A's container volume. filled(A, S): the particles of the substance S inside A's container volume, each counted as a cube of the particle's diameter, take up more than 20% of that volume. real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-canning-food-i00-standard/tests/grade.py b/tasks/behavior-canning-food-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-canning-food-i00-standard/tests/grade.py
+++ b/tasks/behavior-canning-food-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-carrying-in-groceries-i00-privileged/README.md b/tasks/behavior-carrying-in-groceries-i00-privileged/README.md
index 85758ff678..6ca777ab6e 100644
--- a/tasks/behavior-carrying-in-groceries-i00-privileged/README.md
+++ b/tasks/behavior-carrying-in-groceries-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-carrying-in-groceries-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-carrying-in-groceries-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-carrying-in-groceries-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-carrying-in-groceries-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-carrying-in-groceries-i00-privileged/instruction.md b/tasks/behavior-carrying-in-groceries-i00-privileged/instruction.md
index 5a82aa7d53..046f105af1 100644
--- a/tasks/behavior-carrying-in-groceries-i00-privileged/instruction.md
+++ b/tasks/behavior-carrying-in-groceries-i00-privileged/instruction.md
@@ -63,7 +63,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -83,7 +83,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-carrying-in-groceries-i00-privileged/tests/grade.py b/tasks/behavior-carrying-in-groceries-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-carrying-in-groceries-i00-privileged/tests/grade.py
+++ b/tasks/behavior-carrying-in-groceries-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-carrying-in-groceries-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-carrying-in-groceries-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-carrying-in-groceries-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-carrying-in-groceries-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-carrying-in-groceries-i00-standard/README.md b/tasks/behavior-carrying-in-groceries-i00-standard/README.md
index b3979cf9cd..5131ad59b0 100644
--- a/tasks/behavior-carrying-in-groceries-i00-standard/README.md
+++ b/tasks/behavior-carrying-in-groceries-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/server.py b/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-carrying-in-groceries-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-carrying-in-groceries-i00-standard/instruction.md b/tasks/behavior-carrying-in-groceries-i00-standard/instruction.md
index 5e8ee6b9ec..9b1a17632a 100644
--- a/tasks/behavior-carrying-in-groceries-i00-standard/instruction.md
+++ b/tasks/behavior-carrying-in-groceries-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Bring the groceries in from the car. In the garage the car stands open with a sack inside it holding a beefsteak tomato and a carton of milk; put the tomato and the milk into a refrigerator in the kitchen, then close the car and the refrigerator. Success means all of the following hold at the same time: (1) the beefsteak tomato and the carton of milk are both inside one and the same refrigerator; (2) the car is closed; (3) the kitchen refrigerator is closed (if the kitchen has several refrigerators, keep them all closed). How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-carrying-in-groceries-i00-standard/tests/grade.py b/tasks/behavior-carrying-in-groceries-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-carrying-in-groceries-i00-standard/tests/grade.py
+++ b/tasks/behavior-carrying-in-groceries-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/README.md b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/README.md
index 5ab9160f86..1db78c9ed6 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/README.md
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/instruction.md b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/instruction.md
index a273b55b38..8a111f10e3 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/instruction.md
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/instruction.md
@@ -53,7 +53,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -73,7 +73,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/grade.py b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/grade.py
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-standard/README.md b/tasks/behavior-carrying-out-garden-furniture-i00-standard/README.md
index 97ebef9a45..5cd0ca3100 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-standard/README.md
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/server.py b/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-standard/instruction.md b/tasks/behavior-carrying-out-garden-furniture-i00-standard/instruction.md
index 5ab76bfa69..677447e8f9 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-standard/instruction.md
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Carry the garden furniture out of the house. The lawn chair and the wheelbarrow stand on the living-room floor; put the lawn chair on the garden floor and the wheelbarrow on a lawn. Success means all of the following hold at the same time: (1) the lawn chair is on top of the garden floor; (2) the wheelbarrow is on top of a lawn (any lawn in the scene). How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-carrying-out-garden-furniture-i00-standard/tests/grade.py b/tasks/behavior-carrying-out-garden-furniture-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-carrying-out-garden-furniture-i00-standard/tests/grade.py
+++ b/tasks/behavior-carrying-out-garden-furniture-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-chop-an-onion-i00-privileged/README.md b/tasks/behavior-chop-an-onion-i00-privileged/README.md
index 0fc96ba6bc..53078dbcf2 100644
--- a/tasks/behavior-chop-an-onion-i00-privileged/README.md
+++ b/tasks/behavior-chop-an-onion-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-chop-an-onion-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-chop-an-onion-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-chop-an-onion-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-chop-an-onion-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-chop-an-onion-i00-privileged/instruction.md b/tasks/behavior-chop-an-onion-i00-privileged/instruction.md
index b9d2dd6310..d36fadd53d 100644
--- a/tasks/behavior-chop-an-onion-i00-privileged/instruction.md
+++ b/tasks/behavior-chop-an-onion-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-chop-an-onion-i00-privileged/tests/grade.py b/tasks/behavior-chop-an-onion-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-chop-an-onion-i00-privileged/tests/grade.py
+++ b/tasks/behavior-chop-an-onion-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-chop-an-onion-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-chop-an-onion-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-chop-an-onion-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-chop-an-onion-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-chop-an-onion-i00-standard/README.md b/tasks/behavior-chop-an-onion-i00-standard/README.md
index 910d887652..9d7c448697 100644
--- a/tasks/behavior-chop-an-onion-i00-standard/README.md
+++ b/tasks/behavior-chop-an-onion-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-chop-an-onion-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-chop-an-onion-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-chop-an-onion-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-chop-an-onion-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-chop-an-onion-i00-standard/environment/sim/server.py b/tasks/behavior-chop-an-onion-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-chop-an-onion-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-chop-an-onion-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-chop-an-onion-i00-standard/instruction.md b/tasks/behavior-chop-an-onion-i00-standard/instruction.md
index 662ddec5eb..c8f04cad68 100644
--- a/tasks/behavior-chop-an-onion-i00-standard/instruction.md
+++ b/tasks/behavior-chop-an-onion-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Chop an onion in the kitchen. A Vidalia onion is in the sink; a bowl, a chopping board and a paring knife lie on the countertop. Dice the onion on the chopping board with the knife, put the diced onion into the bowl, then put both the knife and the chopping board into the sink. Success means all of the following hold at the same time: (1) diced onion exists (the onion has been diced); (2) the bowl contains the diced onion; (3) the paring knife is inside the sink; (4) the chopping board is inside the sink. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. contains(A, S): at least one particle of the substance S lies inside A's container volume. real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-chop-an-onion-i00-standard/tests/grade.py b/tasks/behavior-chop-an-onion-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-chop-an-onion-i00-standard/tests/grade.py
+++ b/tasks/behavior-chop-an-onion-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-chopping-wood-i00-privileged/README.md b/tasks/behavior-chopping-wood-i00-privileged/README.md
index 674e0ed572..a32fd385e6 100644
--- a/tasks/behavior-chopping-wood-i00-privileged/README.md
+++ b/tasks/behavior-chopping-wood-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-chopping-wood-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-chopping-wood-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-chopping-wood-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-chopping-wood-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-chopping-wood-i00-privileged/instruction.md b/tasks/behavior-chopping-wood-i00-privileged/instruction.md
index dc2917b4ed..c9fabb471c 100644
--- a/tasks/behavior-chopping-wood-i00-privileged/instruction.md
+++ b/tasks/behavior-chopping-wood-i00-privileged/instruction.md
@@ -55,7 +55,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -75,7 +75,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-chopping-wood-i00-privileged/tests/grade.py b/tasks/behavior-chopping-wood-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-chopping-wood-i00-privileged/tests/grade.py
+++ b/tasks/behavior-chopping-wood-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-chopping-wood-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-chopping-wood-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-chopping-wood-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-chopping-wood-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-chopping-wood-i00-standard/README.md b/tasks/behavior-chopping-wood-i00-standard/README.md
index ef7584b094..36b0f2be66 100644
--- a/tasks/behavior-chopping-wood-i00-standard/README.md
+++ b/tasks/behavior-chopping-wood-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-chopping-wood-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-chopping-wood-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-chopping-wood-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-chopping-wood-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-chopping-wood-i00-standard/environment/sim/server.py b/tasks/behavior-chopping-wood-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-chopping-wood-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-chopping-wood-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-chopping-wood-i00-standard/instruction.md b/tasks/behavior-chopping-wood-i00-standard/instruction.md
index 69ef5687db..3a941c8bfb 100644
--- a/tasks/behavior-chopping-wood-i00-standard/instruction.md
+++ b/tasks/behavior-chopping-wood-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Chop the firewood. Four logs, an axe and a chopping block lie on the driveway in the garden; split all four logs in half. Success means all of the following hold at the same time: (1) all eight half logs exist. How the simulator judges them: real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-chopping-wood-i00-standard/tests/grade.py b/tasks/behavior-chopping-wood-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-chopping-wood-i00-standard/tests/grade.py
+++ b/tasks/behavior-chopping-wood-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-a-keyboard-i00-privileged/README.md b/tasks/behavior-clean-a-keyboard-i00-privileged/README.md
index ad82d2857c..43a2c0912e 100644
--- a/tasks/behavior-clean-a-keyboard-i00-privileged/README.md
+++ b/tasks/behavior-clean-a-keyboard-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-a-keyboard-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-a-keyboard-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-keyboard-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-a-keyboard-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-keyboard-i00-privileged/instruction.md b/tasks/behavior-clean-a-keyboard-i00-privileged/instruction.md
index 54eeb4be5a..541577a9d2 100644
--- a/tasks/behavior-clean-a-keyboard-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-a-keyboard-i00-privileged/instruction.md
@@ -50,7 +50,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -70,7 +70,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-a-keyboard-i00-privileged/tests/grade.py b/tasks/behavior-clean-a-keyboard-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-a-keyboard-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-a-keyboard-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-a-keyboard-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-a-keyboard-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-keyboard-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-a-keyboard-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-keyboard-i00-standard/README.md b/tasks/behavior-clean-a-keyboard-i00-standard/README.md
index 6ba1b6c559..0b5e6129ec 100644
--- a/tasks/behavior-clean-a-keyboard-i00-standard/README.md
+++ b/tasks/behavior-clean-a-keyboard-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/server.py b/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-a-keyboard-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-a-keyboard-i00-standard/instruction.md b/tasks/behavior-clean-a-keyboard-i00-standard/instruction.md
index 423e9803f2..0907bc8cb7 100644
--- a/tasks/behavior-clean-a-keyboard-i00-standard/instruction.md
+++ b/tasks/behavior-clean-a-keyboard-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean the keyboard. A dusty keyboard and a pipe cleaner lie on the desk in the private office; remove every bit of dust from the keyboard. Success means all of the following hold at the same time: (1) no dust is left on the keyboard. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-a-keyboard-i00-standard/tests/grade.py b/tasks/behavior-clean-a-keyboard-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-a-keyboard-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-a-keyboard-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-a-patio-i00-privileged/README.md b/tasks/behavior-clean-a-patio-i00-privileged/README.md
index 4c90a429ae..d99cc3a7a7 100644
--- a/tasks/behavior-clean-a-patio-i00-privileged/README.md
+++ b/tasks/behavior-clean-a-patio-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-a-patio-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-a-patio-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-patio-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-a-patio-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-patio-i00-privileged/instruction.md b/tasks/behavior-clean-a-patio-i00-privileged/instruction.md
index 9e419efafe..91ac1f815a 100644
--- a/tasks/behavior-clean-a-patio-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-a-patio-i00-privileged/instruction.md
@@ -50,7 +50,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -70,7 +70,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-a-patio-i00-privileged/tests/grade.py b/tasks/behavior-clean-a-patio-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-a-patio-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-a-patio-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-a-patio-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-a-patio-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-patio-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-a-patio-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-patio-i00-standard/README.md b/tasks/behavior-clean-a-patio-i00-standard/README.md
index 6609f080d9..245f0f5c87 100644
--- a/tasks/behavior-clean-a-patio-i00-standard/README.md
+++ b/tasks/behavior-clean-a-patio-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-a-patio-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-a-patio-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-patio-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-a-patio-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-patio-i00-standard/environment/sim/server.py b/tasks/behavior-clean-a-patio-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-a-patio-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-a-patio-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-a-patio-i00-standard/instruction.md b/tasks/behavior-clean-a-patio-i00-standard/instruction.md
index ade0efe934..dc89c41bb9 100644
--- a/tasks/behavior-clean-a-patio-i00-standard/instruction.md
+++ b/tasks/behavior-clean-a-patio-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean the patio. The garden floor is covered with mud and a broom lies on it; remove every bit of mud from the floor. Success means all of the following hold at the same time: (1) no mud is left on the garden floor. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-a-patio-i00-standard/tests/grade.py b/tasks/behavior-clean-a-patio-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-a-patio-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-a-patio-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-a-trumpet-i00-privileged/README.md b/tasks/behavior-clean-a-trumpet-i00-privileged/README.md
index aeaad9d6ed..9b343c9795 100644
--- a/tasks/behavior-clean-a-trumpet-i00-privileged/README.md
+++ b/tasks/behavior-clean-a-trumpet-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-a-trumpet-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-a-trumpet-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-trumpet-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-a-trumpet-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-trumpet-i00-privileged/instruction.md b/tasks/behavior-clean-a-trumpet-i00-privileged/instruction.md
index 13586e157c..54462920b1 100644
--- a/tasks/behavior-clean-a-trumpet-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-a-trumpet-i00-privileged/instruction.md
@@ -50,7 +50,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -70,7 +70,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-a-trumpet-i00-privileged/tests/grade.py b/tasks/behavior-clean-a-trumpet-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-a-trumpet-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-a-trumpet-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-a-trumpet-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-a-trumpet-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-trumpet-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-a-trumpet-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-trumpet-i00-standard/README.md b/tasks/behavior-clean-a-trumpet-i00-standard/README.md
index 62ffa465b7..4459fe2033 100644
--- a/tasks/behavior-clean-a-trumpet-i00-standard/README.md
+++ b/tasks/behavior-clean-a-trumpet-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/server.py b/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-a-trumpet-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-a-trumpet-i00-standard/instruction.md b/tasks/behavior-clean-a-trumpet-i00-standard/instruction.md
index 6f053e2172..c121facd7b 100644
--- a/tasks/behavior-clean-a-trumpet-i00-standard/instruction.md
+++ b/tasks/behavior-clean-a-trumpet-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean the trumpet. A cornet (a trumpet) covered with dust and a scrub brush lie on the desk in the bedroom; remove every bit of dust from the cornet. Success means all of the following hold at the same time: (1) no dust is left on the cornet. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-a-trumpet-i00-standard/tests/grade.py b/tasks/behavior-clean-a-trumpet-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-a-trumpet-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-a-trumpet-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-boxing-gloves-i00-privileged/README.md b/tasks/behavior-clean-boxing-gloves-i00-privileged/README.md
index ed6e9ccc74..07404664b1 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-privileged/README.md
+++ b/tasks/behavior-clean-boxing-gloves-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-boxing-gloves-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-boxing-gloves-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-boxing-gloves-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-boxing-gloves-i00-privileged/instruction.md b/tasks/behavior-clean-boxing-gloves-i00-privileged/instruction.md
index a39a5a0e7c..8edb60d89e 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-boxing-gloves-i00-privileged/instruction.md
@@ -53,7 +53,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -73,7 +73,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/grade.py b/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-boxing-gloves-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-boxing-gloves-i00-standard/README.md b/tasks/behavior-clean-boxing-gloves-i00-standard/README.md
index 3a2ea9c1ec..8d39d65efd 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-standard/README.md
+++ b/tasks/behavior-clean-boxing-gloves-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/server.py b/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-boxing-gloves-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-boxing-gloves-i00-standard/instruction.md b/tasks/behavior-clean-boxing-gloves-i00-standard/instruction.md
index 2ce86067c9..4c136badbf 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-standard/instruction.md
+++ b/tasks/behavior-clean-boxing-gloves-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean the boxing gloves. Two dusty boxing gloves lie on the countertop in the utility room, where a washer stands; get both gloves clean, so that no dust is left on either of them. Success means all of the following hold at the same time: (1) neither boxing glove is covered with dust. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-boxing-gloves-i00-standard/tests/grade.py b/tasks/behavior-clean-boxing-gloves-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-boxing-gloves-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-boxing-gloves-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-up-broken-glass-i00-privileged/README.md b/tasks/behavior-clean-up-broken-glass-i00-privileged/README.md
index 8266979d01..c026b8d4c7 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-privileged/README.md
+++ b/tasks/behavior-clean-up-broken-glass-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-up-broken-glass-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-up-broken-glass-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-up-broken-glass-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-up-broken-glass-i00-privileged/instruction.md b/tasks/behavior-clean-up-broken-glass-i00-privileged/instruction.md
index bb89bb660f..bf95de5013 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-up-broken-glass-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/grade.py b/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-up-broken-glass-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-up-broken-glass-i00-standard/README.md b/tasks/behavior-clean-up-broken-glass-i00-standard/README.md
index 6a0cc401c6..3ead1623d2 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-standard/README.md
+++ b/tasks/behavior-clean-up-broken-glass-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/server.py b/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-up-broken-glass-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-up-broken-glass-i00-standard/instruction.md b/tasks/behavior-clean-up-broken-glass-i00-standard/instruction.md
index a91bf45016..c291b51984 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-standard/instruction.md
+++ b/tasks/behavior-clean-up-broken-glass-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Three pieces of broken glass lie on the dining-room floor; put all of them inside the trash can that stands on the corridor floor. Success means all of the following hold at the same time: (1) each of the three pieces of broken glass is inside the trash can. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-up-broken-glass-i00-standard/tests/grade.py b/tasks/behavior-clean-up-broken-glass-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-up-broken-glass-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-up-broken-glass-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-up-your-desk-i00-privileged/README.md b/tasks/behavior-clean-up-your-desk-i00-privileged/README.md
index 5bf33d6edd..e4feb7d6be 100644
--- a/tasks/behavior-clean-up-your-desk-i00-privileged/README.md
+++ b/tasks/behavior-clean-up-your-desk-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-up-your-desk-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-up-your-desk-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-up-your-desk-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-up-your-desk-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-up-your-desk-i00-privileged/instruction.md b/tasks/behavior-clean-up-your-desk-i00-privileged/instruction.md
index c02c40bd8e..cadfc802d5 100644
--- a/tasks/behavior-clean-up-your-desk-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-up-your-desk-i00-privileged/instruction.md
@@ -71,7 +71,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -91,7 +91,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-up-your-desk-i00-privileged/tests/grade.py b/tasks/behavior-clean-up-your-desk-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-up-your-desk-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-up-your-desk-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-up-your-desk-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-up-your-desk-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-up-your-desk-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-up-your-desk-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-up-your-desk-i00-standard/README.md b/tasks/behavior-clean-up-your-desk-i00-standard/README.md
index b889432ba5..de7c295e2a 100644
--- a/tasks/behavior-clean-up-your-desk-i00-standard/README.md
+++ b/tasks/behavior-clean-up-your-desk-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/server.py b/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-up-your-desk-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-up-your-desk-i00-standard/instruction.md b/tasks/behavior-clean-up-your-desk-i00-standard/instruction.md
index 2f3c67d4e3..3afe7e1a9d 100644
--- a/tasks/behavior-clean-up-your-desk-i00-standard/instruction.md
+++ b/tasks/behavior-clean-up-your-desk-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean up the desk in the child's room. A folder, a pencil, two pens, two paperback books and a pencil box lie on the desk; the other folder lies on the chair, the stapler is inside the bookcase, and the open laptop lies on the bed. Put both folders and both paperback books into the bookcase and the pencil and both pens into the pencil box, which stays on the desk; take the stapler out of the bookcase and put it on the desk; and put the laptop on the desk, closed. Success means all of the following hold at the same time: (1) both folders and both paperback books are inside the bookcase; (2) the pencil and both pens are inside the pencil box; (3) the pencil box, the stapler and the laptop are on top of the desk; (4) the laptop is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-up-your-desk-i00-standard/tests/grade.py b/tasks/behavior-clean-up-your-desk-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-up-your-desk-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-up-your-desk-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/README.md b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/README.md
index c241c33aca..a60a61439e 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/README.md
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/instruction.md b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/instruction.md
index a9870950fc..3896f167f1 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/instruction.md
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/instruction.md
@@ -62,7 +62,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -82,7 +82,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/grade.py b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/README.md b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/README.md
index ab076a2178..f2dbdf086a 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/README.md
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/server.py b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/instruction.md b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/instruction.md
index d4382f9572..9f254e064b 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/instruction.md
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean the rusty garden tools. A rusty trowel and a rusty scraper lie on the driveway in the garden, next to a toolbox with steel wool inside; remove all the rust from both tools, put them inside the toolbox and close it. Success means all of the following hold at the same time: (1) no rust is left on the trowel or on the scraper; (2) both tools are inside the toolbox; (3) the toolbox is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/tests/grade.py b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/tests/grade.py
+++ b/tasks/behavior-clean-your-rusty-garden-tools-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/README.md b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/README.md
index af5b7a8ae2..7894ea7a02 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/README.md
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/instruction.md b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/instruction.md
index 9f2a291c13..6b1b890ef6 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/instruction.md
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/grade.py b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/README.md b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/README.md
index 44ce5d38a8..ffc7bb8a37 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/README.md
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/server.py b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/instruction.md b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/instruction.md
index c574f01102..ef9c58dc31 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/instruction.md
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean up the garden. Four branches lie on the ground in the garden, where the recycling bin also stands; put all four inside the recycling bin and leave the bin standing on the ground. Success means all of the following hold at the same time: (1) all four branches are inside the recycling bin; (2) the recycling bin is on top of the garden floor. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/tests/grade.py b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/tests/grade.py
+++ b/tasks/behavior-cleaning-up-branches-and-twigs-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/README.md b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/README.md
index 00e570aede..03cd9047cb 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/README.md
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/instruction.md b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/instruction.md
index 67d9ca0ed9..29c2809fa9 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/instruction.md
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/instruction.md
@@ -77,7 +77,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -97,7 +97,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/grade.py b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/README.md b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/README.md
index a8ab092e2a..3e6c89515e 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/README.md
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/server.py b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/instruction.md b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/instruction.md
index 0173530683..56ba002bb3 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/instruction.md
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clean up after the meal in the kitchen. On the breakfast table stand two plates, each with a pizza on it, and two bowls. Put both pizzas, each still on its own plate, into the same refrigerator, put both bowls into the same sink, and leave every kitchen refrigerator closed. Success means all of the following hold at the same time: (1) each pizza is on top of a different plate; (2) both pizzas are inside the same refrigerator; (3) both bowls are inside the same sink; (4) every kitchen refrigerator is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/tests/grade.py b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cleaning-up-plates-and-food-i00-standard/tests/grade.py
+++ b/tasks/behavior-cleaning-up-plates-and-food-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/README.md b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/README.md
index c56212f5dd..afc547ec18 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/README.md
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/instruction.md b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/instruction.md
index 17d1bf519b..502e21d848 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/instruction.md
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/instruction.md
@@ -66,7 +66,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -86,7 +86,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/grade.py b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/grade.py
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/README.md b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/README.md
index 80f5c8048c..645cdfc537 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/README.md
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/server.py b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/instruction.md b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/instruction.md
index d5e5db288e..b8c03f834a 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/instruction.md
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clear the leftovers from the kitchen breakfast table into the fridge. A half chicken and a half apple pie lie on two plates on the table, and two empty tupperwares stand on the countertop; put the chicken and the pie into tupperwares, put both tupperwares into the refrigerator, and leave it closed. Success means all of the following hold at the same time: (1) the half chicken is inside a tupperware; (2) the half apple pie is inside a tupperware (the same one or the other); (3) both tupperwares are inside the refrigerator; (4) the refrigerator is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/tests/grade.py b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/tests/grade.py
+++ b/tasks/behavior-clearing-food-from-table-into-fridge-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-privileged/README.md b/tasks/behavior-collecting-aluminum-cans-i00-privileged/README.md
index fd27ce4414..d7b1896530 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-privileged/README.md
+++ b/tasks/behavior-collecting-aluminum-cans-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-collecting-aluminum-cans-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-collecting-aluminum-cans-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-privileged/instruction.md b/tasks/behavior-collecting-aluminum-cans-i00-privileged/instruction.md
index 4ac5b8cba3..455d126b5f 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-privileged/instruction.md
+++ b/tasks/behavior-collecting-aluminum-cans-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/grade.py b/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/grade.py
+++ b/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-collecting-aluminum-cans-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-standard/README.md b/tasks/behavior-collecting-aluminum-cans-i00-standard/README.md
index 2cfe175808..dc98a5f1d3 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-standard/README.md
+++ b/tasks/behavior-collecting-aluminum-cans-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/server.py b/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-collecting-aluminum-cans-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-standard/instruction.md b/tasks/behavior-collecting-aluminum-cans-i00-standard/instruction.md
index bec613879a..6abc1f62d6 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-standard/instruction.md
+++ b/tasks/behavior-collecting-aluminum-cans-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Collect the six soda cans in the bedroom, three lying on the bed and three on the floor, into the bucket that stands on the bedroom floor. Success means all of the following hold at the same time: (1) all six cans of soda are inside the bucket. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-collecting-aluminum-cans-i00-standard/tests/grade.py b/tasks/behavior-collecting-aluminum-cans-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-collecting-aluminum-cans-i00-standard/tests/grade.py
+++ b/tasks/behavior-collecting-aluminum-cans-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-collecting-childrens-toys-i00-privileged/README.md b/tasks/behavior-collecting-childrens-toys-i00-privileged/README.md
index a158c2d716..8d8d0d309e 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-privileged/README.md
+++ b/tasks/behavior-collecting-childrens-toys-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-collecting-childrens-toys-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-collecting-childrens-toys-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-collecting-childrens-toys-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-collecting-childrens-toys-i00-privileged/instruction.md b/tasks/behavior-collecting-childrens-toys-i00-privileged/instruction.md
index 82b3cafdd4..d946da0512 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-privileged/instruction.md
+++ b/tasks/behavior-collecting-childrens-toys-i00-privileged/instruction.md
@@ -68,7 +68,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -88,7 +88,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/grade.py b/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/grade.py
+++ b/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-collecting-childrens-toys-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-collecting-childrens-toys-i00-standard/README.md b/tasks/behavior-collecting-childrens-toys-i00-standard/README.md
index cc12102966..8da47b1a9f 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-standard/README.md
+++ b/tasks/behavior-collecting-childrens-toys-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/server.py b/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-collecting-childrens-toys-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-collecting-childrens-toys-i00-standard/instruction.md b/tasks/behavior-collecting-childrens-toys-i00-standard/instruction.md
index ab0a37b89d..fa698ea65a 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-standard/instruction.md
+++ b/tasks/behavior-collecting-childrens-toys-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Collect the children's toys in the child's room. Two dice and a board game lie on the bed, two teddy bears on the floor, and a train set and another board game on the desk; put all seven toys inside one and the same bookcase of the child's room. Success means all of the following hold at the same time: (1) both dice, both teddy bears, both board games and the train set are inside the same bookcase. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-collecting-childrens-toys-i00-standard/tests/grade.py b/tasks/behavior-collecting-childrens-toys-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-collecting-childrens-toys-i00-standard/tests/grade.py
+++ b/tasks/behavior-collecting-childrens-toys-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-composting-waste-i00-privileged/README.md b/tasks/behavior-composting-waste-i00-privileged/README.md
index dca46636d6..53b270815d 100644
--- a/tasks/behavior-composting-waste-i00-privileged/README.md
+++ b/tasks/behavior-composting-waste-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-composting-waste-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-composting-waste-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-composting-waste-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-composting-waste-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-composting-waste-i00-privileged/instruction.md b/tasks/behavior-composting-waste-i00-privileged/instruction.md
index 687e3b54f4..337389782c 100644
--- a/tasks/behavior-composting-waste-i00-privileged/instruction.md
+++ b/tasks/behavior-composting-waste-i00-privileged/instruction.md
@@ -50,7 +50,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -70,7 +70,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-composting-waste-i00-privileged/tests/grade.py b/tasks/behavior-composting-waste-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-composting-waste-i00-privileged/tests/grade.py
+++ b/tasks/behavior-composting-waste-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-composting-waste-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-composting-waste-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-composting-waste-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-composting-waste-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-composting-waste-i00-standard/README.md b/tasks/behavior-composting-waste-i00-standard/README.md
index 6c84c9c9de..579d8896d5 100644
--- a/tasks/behavior-composting-waste-i00-standard/README.md
+++ b/tasks/behavior-composting-waste-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-composting-waste-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-composting-waste-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-composting-waste-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-composting-waste-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-composting-waste-i00-standard/environment/sim/server.py b/tasks/behavior-composting-waste-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-composting-waste-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-composting-waste-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-composting-waste-i00-standard/instruction.md b/tasks/behavior-composting-waste-i00-standard/instruction.md
index 8f24668918..4b1d9b32a1 100644
--- a/tasks/behavior-composting-waste-i00-standard/instruction.md
+++ b/tasks/behavior-composting-waste-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the half banana and the half pomegranate, which lie on the kitchen countertop, inside the trash can that stands on the kitchen floor. Success means all of the following hold at the same time: (1) the half banana is inside the trash can; (2) the half pomegranate is inside the same trash can. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-composting-waste-i00-standard/tests/grade.py b/tasks/behavior-composting-waste-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-composting-waste-i00-standard/tests/grade.py
+++ b/tasks/behavior-composting-waste-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-a-brisket-i00-privileged/README.md b/tasks/behavior-cook-a-brisket-i00-privileged/README.md
index f0634c5d35..fed34a7b6f 100644
--- a/tasks/behavior-cook-a-brisket-i00-privileged/README.md
+++ b/tasks/behavior-cook-a-brisket-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-a-brisket-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-a-brisket-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-a-brisket-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-a-brisket-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-a-brisket-i00-privileged/instruction.md b/tasks/behavior-cook-a-brisket-i00-privileged/instruction.md
index b80fc9d369..9c5f248421 100644
--- a/tasks/behavior-cook-a-brisket-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-a-brisket-i00-privileged/instruction.md
@@ -53,7 +53,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -73,7 +73,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-a-brisket-i00-privileged/tests/grade.py b/tasks/behavior-cook-a-brisket-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-a-brisket-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-a-brisket-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-a-brisket-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-a-brisket-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-a-brisket-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-a-brisket-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-a-brisket-i00-standard/README.md b/tasks/behavior-cook-a-brisket-i00-standard/README.md
index 165e7806a5..8590465335 100644
--- a/tasks/behavior-cook-a-brisket-i00-standard/README.md
+++ b/tasks/behavior-cook-a-brisket-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/server.py b/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-a-brisket-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-a-brisket-i00-standard/instruction.md b/tasks/behavior-cook-a-brisket-i00-standard/instruction.md
index ac9a15c776..c402f318d7 100644
--- a/tasks/behavior-cook-a-brisket-i00-standard/instruction.md
+++ b/tasks/behavior-cook-a-brisket-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Cook the brisket. It is raw, inside the kitchen refrigerator; a chopping board and a frying pan are on the countertop and there is an oven in the kitchen. Cook the brisket and put it on the chopping board; the frying pan must end up on the countertop. Success means all of the following hold at the same time: (1) the brisket is cooked; (2) the brisket is on top of the chopping board; (3) the frying pan is on top of the countertop. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). cooked(A): the highest temperature A has ever reached is at least its cooking temperature (70 °C by default). Heat comes from a heat source that is on (a stove burner, an oven: 200 °C) within 0.2 m of A; once cooked, A stays cooked. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-a-brisket-i00-standard/tests/grade.py b/tasks/behavior-cook-a-brisket-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-a-brisket-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-a-brisket-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-privileged/README.md b/tasks/behavior-cook-a-frozen-pie-i00-privileged/README.md
index 853dc48071..277e7e7b01 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-privileged/README.md
+++ b/tasks/behavior-cook-a-frozen-pie-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-a-frozen-pie-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-a-frozen-pie-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-privileged/instruction.md b/tasks/behavior-cook-a-frozen-pie-i00-privileged/instruction.md
index eb001f58af..1818482524 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-a-frozen-pie-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/grade.py b/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-a-frozen-pie-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-standard/README.md b/tasks/behavior-cook-a-frozen-pie-i00-standard/README.md
index 8dbcd57dd3..479dd7c27b 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-standard/README.md
+++ b/tasks/behavior-cook-a-frozen-pie-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/server.py b/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-a-frozen-pie-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-standard/instruction.md b/tasks/behavior-cook-a-frozen-pie-i00-standard/instruction.md
index 60c476d518..f92cd9f1f4 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-standard/instruction.md
+++ b/tasks/behavior-cook-a-frozen-pie-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Cook the frozen pie. A frozen apple pie is inside the refrigerator in the kitchen, a tray lies on the countertop and there is an oven in the kitchen; cook the pie and put it on the tray. Success means all of the following hold at the same time: (1) the apple pie is cooked; (2) the apple pie is on top of the tray. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). cooked(A): the highest temperature A has ever reached is at least its cooking temperature (70 °C by default). Heat comes from a heat source that is on (a stove burner, an oven: 200 °C) within 0.2 m of A; once cooked, A stays cooked. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-a-frozen-pie-i00-standard/tests/grade.py b/tasks/behavior-cook-a-frozen-pie-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-a-frozen-pie-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-a-frozen-pie-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-bacon-i00-privileged/README.md b/tasks/behavior-cook-bacon-i00-privileged/README.md
index 2defb84a3a..bebad6b204 100644
--- a/tasks/behavior-cook-bacon-i00-privileged/README.md
+++ b/tasks/behavior-cook-bacon-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-bacon-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-bacon-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-bacon-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-bacon-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-bacon-i00-privileged/instruction.md b/tasks/behavior-cook-bacon-i00-privileged/instruction.md
index ab04560e29..f43218ab8e 100644
--- a/tasks/behavior-cook-bacon-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-bacon-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-bacon-i00-privileged/tests/grade.py b/tasks/behavior-cook-bacon-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-bacon-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-bacon-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-bacon-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-bacon-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-bacon-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-bacon-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-bacon-i00-standard/README.md b/tasks/behavior-cook-bacon-i00-standard/README.md
index bec2cb16bf..266ab2b372 100644
--- a/tasks/behavior-cook-bacon-i00-standard/README.md
+++ b/tasks/behavior-cook-bacon-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-bacon-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-bacon-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-bacon-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-bacon-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-bacon-i00-standard/environment/sim/server.py b/tasks/behavior-cook-bacon-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-bacon-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-bacon-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-bacon-i00-standard/instruction.md b/tasks/behavior-cook-bacon-i00-standard/instruction.md
index 6db796f7ed..716fc687d4 100644
--- a/tasks/behavior-cook-bacon-i00-standard/instruction.md
+++ b/tasks/behavior-cook-bacon-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Cook the bacon. A tray with six slices of bacon is inside the kitchen refrigerator and a frying pan stands on the stove; cook all six slices and leave the refrigerator closed. Success means all of the following hold at the same time: (1) all six slices of bacon are cooked; (2) the refrigerator is closed. How the simulator judges them: open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. cooked(A): the highest temperature A has ever reached is at least its cooking temperature (70 °C by default). Heat comes from a heat source that is on (a stove burner, an oven: 200 °C) within 0.2 m of A; once cooked, A stays cooked. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-bacon-i00-standard/tests/grade.py b/tasks/behavior-cook-bacon-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-bacon-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-bacon-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-broccolini-i00-privileged/README.md b/tasks/behavior-cook-broccolini-i00-privileged/README.md
index 1a834c8f63..9da016e957 100644
--- a/tasks/behavior-cook-broccolini-i00-privileged/README.md
+++ b/tasks/behavior-cook-broccolini-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-broccolini-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-broccolini-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-broccolini-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-broccolini-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-broccolini-i00-privileged/instruction.md b/tasks/behavior-cook-broccolini-i00-privileged/instruction.md
index 7f832bcc06..e695db19b5 100644
--- a/tasks/behavior-cook-broccolini-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-broccolini-i00-privileged/instruction.md
@@ -65,7 +65,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -85,7 +85,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-broccolini-i00-privileged/tests/grade.py b/tasks/behavior-cook-broccolini-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-broccolini-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-broccolini-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-broccolini-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-broccolini-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-broccolini-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-broccolini-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-broccolini-i00-standard/README.md b/tasks/behavior-cook-broccolini-i00-standard/README.md
index 7bae13eec3..fdcc8195f2 100644
--- a/tasks/behavior-cook-broccolini-i00-standard/README.md
+++ b/tasks/behavior-cook-broccolini-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-broccolini-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-broccolini-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-broccolini-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-broccolini-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-broccolini-i00-standard/environment/sim/server.py b/tasks/behavior-cook-broccolini-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-broccolini-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-broccolini-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-broccolini-i00-standard/instruction.md b/tasks/behavior-cook-broccolini-i00-standard/instruction.md
index 8d0212ca31..1619a318af 100644
--- a/tasks/behavior-cook-broccolini-i00-standard/instruction.md
+++ b/tasks/behavior-cook-broccolini-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Cook the broccolini with garlic. Three broccolini and two garlic cloves lie on a plate on the kitchen countertop, next to a frying pan; put all of them into the frying pan, put the pan on the stove, and cook them. Success means all of the following hold at the same time: (1) both cloves are on top of the frying pan and cooked; (2) all three broccolini are on top of the frying pan and cooked; (3) the frying pan is on top of the stove. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). cooked(A): the highest temperature A has ever reached is at least its cooking temperature (70 °C by default). Heat comes from a heat source that is on (a stove burner, an oven: 200 °C) within 0.2 m of A; once cooked, A stays cooked. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-broccolini-i00-standard/tests/grade.py b/tasks/behavior-cook-broccolini-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-broccolini-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-broccolini-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-privileged/README.md b/tasks/behavior-cook-brussels-sprouts-i00-privileged/README.md
index ce773b04fd..704d64a012 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-privileged/README.md
+++ b/tasks/behavior-cook-brussels-sprouts-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-brussels-sprouts-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-brussels-sprouts-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-privileged/instruction.md b/tasks/behavior-cook-brussels-sprouts-i00-privileged/instruction.md
index 656b741ac0..ad82030f2a 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-brussels-sprouts-i00-privileged/instruction.md
@@ -66,7 +66,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -86,7 +86,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/grade.py b/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-brussels-sprouts-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-standard/README.md b/tasks/behavior-cook-brussels-sprouts-i00-standard/README.md
index a24c4a7446..66833df1e8 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-standard/README.md
+++ b/tasks/behavior-cook-brussels-sprouts-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/server.py b/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-brussels-sprouts-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-standard/instruction.md b/tasks/behavior-cook-brussels-sprouts-i00-standard/instruction.md
index 085d2c9350..2d2ae41695 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-standard/instruction.md
+++ b/tasks/behavior-cook-brussels-sprouts-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Roast the halved brussels sprouts. Four brussels sprouts are in a tupperware inside the kitchen refrigerator; a chopping board with a carving knife on it and a cookie sheet lie on the countertop, and there is an oven in the kitchen. Cut every sprout in half, cook all eight halves in the oven and leave them inside it, and close the oven and the refrigerator. Success means all of the following hold at the same time: (1) all eight half brussels sprouts exist (every sprout has been cut in half); (2) every half is cooked and inside the oven; (3) the refrigerator and the oven are closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. cooked(A): the highest temperature A has ever reached is at least its cooking temperature (70 °C by default). Heat comes from a heat source that is on (a stove burner, an oven: 200 °C) within 0.2 m of A; once cooked, A stays cooked. real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-brussels-sprouts-i00-standard/tests/grade.py b/tasks/behavior-cook-brussels-sprouts-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-brussels-sprouts-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-brussels-sprouts-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-cabbage-i00-privileged/README.md b/tasks/behavior-cook-cabbage-i00-privileged/README.md
index 5d8c187b27..91a35f6da7 100644
--- a/tasks/behavior-cook-cabbage-i00-privileged/README.md
+++ b/tasks/behavior-cook-cabbage-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-cabbage-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-cabbage-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-cabbage-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-cabbage-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-cabbage-i00-privileged/instruction.md b/tasks/behavior-cook-cabbage-i00-privileged/instruction.md
index a04d868738..e493394efe 100644
--- a/tasks/behavior-cook-cabbage-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-cabbage-i00-privileged/instruction.md
@@ -53,7 +53,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -73,7 +73,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-cabbage-i00-privileged/tests/grade.py b/tasks/behavior-cook-cabbage-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-cabbage-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-cabbage-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-cabbage-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-cabbage-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-cabbage-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-cabbage-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-cabbage-i00-standard/README.md b/tasks/behavior-cook-cabbage-i00-standard/README.md
index 8d32d9a1ae..16e995f3da 100644
--- a/tasks/behavior-cook-cabbage-i00-standard/README.md
+++ b/tasks/behavior-cook-cabbage-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-cabbage-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-cabbage-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-cabbage-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-cabbage-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-cabbage-i00-standard/environment/sim/server.py b/tasks/behavior-cook-cabbage-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-cabbage-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-cabbage-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-cabbage-i00-standard/instruction.md b/tasks/behavior-cook-cabbage-i00-standard/instruction.md
index cdee697286..8ebdb3cac6 100644
--- a/tasks/behavior-cook-cabbage-i00-standard/instruction.md
+++ b/tasks/behavior-cook-cabbage-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Cook diced cabbage with chili. The head cabbage and the chili are inside the kitchen refrigerator; a frying pan, a plate, a chopping board and a carving knife lie on the countertop, and there is a stove in the kitchen. Dice the cabbage and the chili and cook them in the frying pan, so that the pan holds cooked diced cabbage and cooked diced chili. Success means all of the following hold at the same time: (1) cooked diced cabbage and cooked diced chili exist; (2) the frying pan contains both. How the simulator judges them: contains(A, S): at least one particle of the substance S lies inside A's container volume. real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-cabbage-i00-standard/tests/grade.py b/tasks/behavior-cook-cabbage-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-cabbage-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-cabbage-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-cook-hot-dogs-i00-privileged/README.md b/tasks/behavior-cook-hot-dogs-i00-privileged/README.md
index 33a31084bc..69aa8eb12e 100644
--- a/tasks/behavior-cook-hot-dogs-i00-privileged/README.md
+++ b/tasks/behavior-cook-hot-dogs-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-hot-dogs-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-cook-hot-dogs-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-hot-dogs-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-cook-hot-dogs-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-hot-dogs-i00-privileged/instruction.md b/tasks/behavior-cook-hot-dogs-i00-privileged/instruction.md
index 239758e950..93bd4c4359 100644
--- a/tasks/behavior-cook-hot-dogs-i00-privileged/instruction.md
+++ b/tasks/behavior-cook-hot-dogs-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-cook-hot-dogs-i00-privileged/tests/grade.py b/tasks/behavior-cook-hot-dogs-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-cook-hot-dogs-i00-privileged/tests/grade.py
+++ b/tasks/behavior-cook-hot-dogs-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-cook-hot-dogs-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-cook-hot-dogs-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-hot-dogs-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-cook-hot-dogs-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-hot-dogs-i00-standard/README.md b/tasks/behavior-cook-hot-dogs-i00-standard/README.md
index f623feeb9b..10c106358b 100644
--- a/tasks/behavior-cook-hot-dogs-i00-standard/README.md
+++ b/tasks/behavior-cook-hot-dogs-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/server.py b/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-cook-hot-dogs-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-cook-hot-dogs-i00-standard/instruction.md b/tasks/behavior-cook-hot-dogs-i00-standard/instruction.md
index 98d4e6c0fb..d23564f5e3 100644
--- a/tasks/behavior-cook-hot-dogs-i00-standard/instruction.md
+++ b/tasks/behavior-cook-hot-dogs-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Cook the hot dogs. Two hot dogs are inside the kitchen refrigerator and a microwave stands in the kitchen; cook both hot dogs. Success means all of the following hold at the same time: (1) both hot dogs are cooked. How the simulator judges them: cooked(A): the highest temperature A has ever reached is at least its cooking temperature (70 °C by default). Heat comes from a heat source that is on (a stove burner, an oven: 200 °C) within 0.2 m of A; once cooked, A stays cooked. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-cook-hot-dogs-i00-standard/tests/grade.py b/tasks/behavior-cook-hot-dogs-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-cook-hot-dogs-i00-standard/tests/grade.py
+++ b/tasks/behavior-cook-hot-dogs-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-dispose-of-batteries-i00-privileged/README.md b/tasks/behavior-dispose-of-batteries-i00-privileged/README.md
index 9d6e21b2db..06145388df 100644
--- a/tasks/behavior-dispose-of-batteries-i00-privileged/README.md
+++ b/tasks/behavior-dispose-of-batteries-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-dispose-of-batteries-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-dispose-of-batteries-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-dispose-of-batteries-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-dispose-of-batteries-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-dispose-of-batteries-i00-privileged/instruction.md b/tasks/behavior-dispose-of-batteries-i00-privileged/instruction.md
index df9d445097..7e8c121946 100644
--- a/tasks/behavior-dispose-of-batteries-i00-privileged/instruction.md
+++ b/tasks/behavior-dispose-of-batteries-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-dispose-of-batteries-i00-privileged/tests/grade.py b/tasks/behavior-dispose-of-batteries-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-dispose-of-batteries-i00-privileged/tests/grade.py
+++ b/tasks/behavior-dispose-of-batteries-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-dispose-of-batteries-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-dispose-of-batteries-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-dispose-of-batteries-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-dispose-of-batteries-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-dispose-of-batteries-i00-standard/README.md b/tasks/behavior-dispose-of-batteries-i00-standard/README.md
index ad470e5daa..8bb3f20989 100644
--- a/tasks/behavior-dispose-of-batteries-i00-standard/README.md
+++ b/tasks/behavior-dispose-of-batteries-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/server.py b/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-dispose-of-batteries-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-dispose-of-batteries-i00-standard/instruction.md b/tasks/behavior-dispose-of-batteries-i00-standard/instruction.md
index 4cc43e7520..077f707c18 100644
--- a/tasks/behavior-dispose-of-batteries-i00-standard/instruction.md
+++ b/tasks/behavior-dispose-of-batteries-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Dispose of the batteries. Two batteries lie on the desk in the private office and one on the cabinet in the copy room; put all three inside the wastebasket that stands on the copy-room floor, and leave the wastebasket standing on the floor. Success means all of the following hold at the same time: (1) all three batteries are inside the wastebasket; (2) the wastebasket is on top of the copy-room floor. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-dispose-of-batteries-i00-standard/tests/grade.py b/tasks/behavior-dispose-of-batteries-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-dispose-of-batteries-i00-standard/tests/grade.py
+++ b/tasks/behavior-dispose-of-batteries-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-dispose-of-glass-i00-privileged/README.md b/tasks/behavior-dispose-of-glass-i00-privileged/README.md
index 370aa00ae5..a90d8c46bf 100644
--- a/tasks/behavior-dispose-of-glass-i00-privileged/README.md
+++ b/tasks/behavior-dispose-of-glass-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-dispose-of-glass-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-dispose-of-glass-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-dispose-of-glass-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-dispose-of-glass-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-dispose-of-glass-i00-privileged/instruction.md b/tasks/behavior-dispose-of-glass-i00-privileged/instruction.md
index 147c902b61..7ec4a6da91 100644
--- a/tasks/behavior-dispose-of-glass-i00-privileged/instruction.md
+++ b/tasks/behavior-dispose-of-glass-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-dispose-of-glass-i00-privileged/tests/grade.py b/tasks/behavior-dispose-of-glass-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-dispose-of-glass-i00-privileged/tests/grade.py
+++ b/tasks/behavior-dispose-of-glass-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-dispose-of-glass-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-dispose-of-glass-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-dispose-of-glass-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-dispose-of-glass-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-dispose-of-glass-i00-standard/README.md b/tasks/behavior-dispose-of-glass-i00-standard/README.md
index ba33c4f82a..d9ddea33bd 100644
--- a/tasks/behavior-dispose-of-glass-i00-standard/README.md
+++ b/tasks/behavior-dispose-of-glass-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/server.py b/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-dispose-of-glass-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-dispose-of-glass-i00-standard/instruction.md b/tasks/behavior-dispose-of-glass-i00-standard/instruction.md
index f0764fa0b0..8f832e1554 100644
--- a/tasks/behavior-dispose-of-glass-i00-standard/instruction.md
+++ b/tasks/behavior-dispose-of-glass-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Four water glasses stand on the bathroom sink; put all four inside the trash can that stands on the bedroom floor. Success means all of the following hold at the same time: (1) each of the four water glasses is inside the trash can. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-dispose-of-glass-i00-standard/tests/grade.py b/tasks/behavior-dispose-of-glass-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-dispose-of-glass-i00-standard/tests/grade.py
+++ b/tasks/behavior-dispose-of-glass-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-freeze-fruit-i00-privileged/README.md b/tasks/behavior-freeze-fruit-i00-privileged/README.md
index ebef3f311c..a4d4755448 100644
--- a/tasks/behavior-freeze-fruit-i00-privileged/README.md
+++ b/tasks/behavior-freeze-fruit-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-freeze-fruit-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-freeze-fruit-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-freeze-fruit-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-freeze-fruit-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-freeze-fruit-i00-privileged/instruction.md b/tasks/behavior-freeze-fruit-i00-privileged/instruction.md
index 8daca69c32..20558c34f7 100644
--- a/tasks/behavior-freeze-fruit-i00-privileged/instruction.md
+++ b/tasks/behavior-freeze-fruit-i00-privileged/instruction.md
@@ -69,7 +69,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -89,7 +89,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-freeze-fruit-i00-privileged/tests/grade.py b/tasks/behavior-freeze-fruit-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-freeze-fruit-i00-privileged/tests/grade.py
+++ b/tasks/behavior-freeze-fruit-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-freeze-fruit-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-freeze-fruit-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-freeze-fruit-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-freeze-fruit-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-freeze-fruit-i00-standard/README.md b/tasks/behavior-freeze-fruit-i00-standard/README.md
index cea3f28b04..4d814144a9 100644
--- a/tasks/behavior-freeze-fruit-i00-standard/README.md
+++ b/tasks/behavior-freeze-fruit-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-freeze-fruit-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-freeze-fruit-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-freeze-fruit-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-freeze-fruit-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-freeze-fruit-i00-standard/environment/sim/server.py b/tasks/behavior-freeze-fruit-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-freeze-fruit-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-freeze-fruit-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-freeze-fruit-i00-standard/instruction.md b/tasks/behavior-freeze-fruit-i00-standard/instruction.md
index c01fc72e2b..228fb6119f 100644
--- a/tasks/behavior-freeze-fruit-i00-standard/instruction.md
+++ b/tasks/behavior-freeze-fruit-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the fruit into the refrigerator. Two apples lie in a bowl and two strawberries on a tray on the kitchen countertop, and two tupperwares are inside a kitchen cabinet. Put one apple and one strawberry into each tupperware, put both tupperwares into the refrigerator, and close it. Success means all of the following hold at the same time: (1) each apple is inside a different tupperware; (2) each strawberry is inside a different tupperware; (3) both tupperwares are inside the refrigerator; (4) the refrigerator is closed. The fruit does not need to be frozen. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-freeze-fruit-i00-standard/tests/grade.py b/tasks/behavior-freeze-fruit-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-freeze-fruit-i00-standard/tests/grade.py
+++ b/tasks/behavior-freeze-fruit-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-freeze-pies-i00-privileged/README.md b/tasks/behavior-freeze-pies-i00-privileged/README.md
index b26895c10a..e643acf0af 100644
--- a/tasks/behavior-freeze-pies-i00-privileged/README.md
+++ b/tasks/behavior-freeze-pies-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-freeze-pies-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-freeze-pies-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-freeze-pies-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-freeze-pies-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-freeze-pies-i00-privileged/instruction.md b/tasks/behavior-freeze-pies-i00-privileged/instruction.md
index faf344cc56..1b2cb4b94c 100644
--- a/tasks/behavior-freeze-pies-i00-privileged/instruction.md
+++ b/tasks/behavior-freeze-pies-i00-privileged/instruction.md
@@ -68,7 +68,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -88,7 +88,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-freeze-pies-i00-privileged/tests/grade.py b/tasks/behavior-freeze-pies-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-freeze-pies-i00-privileged/tests/grade.py
+++ b/tasks/behavior-freeze-pies-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-freeze-pies-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-freeze-pies-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-freeze-pies-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-freeze-pies-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-freeze-pies-i00-standard/README.md b/tasks/behavior-freeze-pies-i00-standard/README.md
index 350bb39f15..139a590fac 100644
--- a/tasks/behavior-freeze-pies-i00-standard/README.md
+++ b/tasks/behavior-freeze-pies-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-freeze-pies-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-freeze-pies-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-freeze-pies-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-freeze-pies-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-freeze-pies-i00-standard/environment/sim/server.py b/tasks/behavior-freeze-pies-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-freeze-pies-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-freeze-pies-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-freeze-pies-i00-standard/instruction.md b/tasks/behavior-freeze-pies-i00-standard/instruction.md
index 471c943d33..acce556b89 100644
--- a/tasks/behavior-freeze-pies-i00-standard/instruction.md
+++ b/tasks/behavior-freeze-pies-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Freeze the pies. Two apple pies lie on two plates on the kitchen countertop, and two tupperwares are inside a kitchen cabinet. Put each pie into its own tupperware, put both tupperwares into the refrigerator, close it, and wait until both pies are frozen. Success means all of the following hold at the same time: (1) each apple pie is inside a different tupperware; (2) both tupperwares are inside the refrigerator; (3) both pies are frozen; (4) the refrigerator is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. frozen(A): A's current temperature is at or below its freezing temperature (0 °C by default). Objects drift back towards the 23 °C room temperature, so A stops being frozen once it has warmed above 0 °C. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-freeze-pies-i00-standard/tests/grade.py b/tasks/behavior-freeze-pies-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-freeze-pies-i00-standard/tests/grade.py
+++ b/tasks/behavior-freeze-pies-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-getting-organized-for-work-i00-privileged/README.md b/tasks/behavior-getting-organized-for-work-i00-privileged/README.md
index 25a7640dee..e6964bfb80 100644
--- a/tasks/behavior-getting-organized-for-work-i00-privileged/README.md
+++ b/tasks/behavior-getting-organized-for-work-i00-privileged/README.md
@@ -47,3 +47,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-getting-organized-for-work-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-getting-organized-for-work-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-getting-organized-for-work-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-getting-organized-for-work-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-getting-organized-for-work-i00-privileged/instruction.md b/tasks/behavior-getting-organized-for-work-i00-privileged/instruction.md
index d11ffb1c7d..8a5a358579 100644
--- a/tasks/behavior-getting-organized-for-work-i00-privileged/instruction.md
+++ b/tasks/behavior-getting-organized-for-work-i00-privileged/instruction.md
@@ -63,7 +63,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -83,7 +83,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-getting-organized-for-work-i00-privileged/tests/grade.py b/tasks/behavior-getting-organized-for-work-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-getting-organized-for-work-i00-privileged/tests/grade.py
+++ b/tasks/behavior-getting-organized-for-work-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-getting-organized-for-work-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-getting-organized-for-work-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-getting-organized-for-work-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-getting-organized-for-work-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-getting-organized-for-work-i00-standard/README.md b/tasks/behavior-getting-organized-for-work-i00-standard/README.md
index 1445e63799..ffb910333d 100644
--- a/tasks/behavior-getting-organized-for-work-i00-standard/README.md
+++ b/tasks/behavior-getting-organized-for-work-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/server.py b/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-getting-organized-for-work-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-getting-organized-for-work-i00-standard/instruction.md b/tasks/behavior-getting-organized-for-work-i00-standard/instruction.md
index a3c4ec6c3c..b38ab830e2 100644
--- a/tasks/behavior-getting-organized-for-work-i00-standard/instruction.md
+++ b/tasks/behavior-getting-organized-for-work-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Organize the bedroom desk for work. The monitor and the mouse stand on the desk, the keyboard lies on a notebook on the desk, the computer stands under the desk, and a folder with a pen on it lies on the swivel chair. Leave the computer under the desk and the monitor on it; put the keyboard on the desk next to the monitor and the mouse on the desk next to the keyboard; put the folder next to the mouse, the notebook on the folder and the pen on the notebook; and put the swivel chair next to the desk. Success means all of the following hold at the same time: (1) the monitor is on top of the desk and the computer is under the desk; (2) the keyboard is on top of the desk and next to the monitor; (3) the mouse is on top of the desk and next to the keyboard; (4) the folder is next to the mouse, the notebook is on top of the folder and the pen on top of the notebook; (5) the swivel chair is next to the desk. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. under(A, B): B is directly above A (and not below it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-getting-organized-for-work-i00-standard/tests/grade.py b/tasks/behavior-getting-organized-for-work-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-getting-organized-for-work-i00-standard/tests/grade.py
+++ b/tasks/behavior-getting-organized-for-work-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-halve-an-egg-i00-privileged/README.md b/tasks/behavior-halve-an-egg-i00-privileged/README.md
index cde4683a92..8f2324b78f 100644
--- a/tasks/behavior-halve-an-egg-i00-privileged/README.md
+++ b/tasks/behavior-halve-an-egg-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-halve-an-egg-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-halve-an-egg-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-halve-an-egg-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-halve-an-egg-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-halve-an-egg-i00-privileged/instruction.md b/tasks/behavior-halve-an-egg-i00-privileged/instruction.md
index 70c35b75fc..7b6b19aae9 100644
--- a/tasks/behavior-halve-an-egg-i00-privileged/instruction.md
+++ b/tasks/behavior-halve-an-egg-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-halve-an-egg-i00-privileged/tests/grade.py b/tasks/behavior-halve-an-egg-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-halve-an-egg-i00-privileged/tests/grade.py
+++ b/tasks/behavior-halve-an-egg-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-halve-an-egg-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-halve-an-egg-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-halve-an-egg-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-halve-an-egg-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-halve-an-egg-i00-standard/README.md b/tasks/behavior-halve-an-egg-i00-standard/README.md
index 8d1847d000..d136544be2 100644
--- a/tasks/behavior-halve-an-egg-i00-standard/README.md
+++ b/tasks/behavior-halve-an-egg-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-halve-an-egg-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-halve-an-egg-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-halve-an-egg-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-halve-an-egg-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-halve-an-egg-i00-standard/environment/sim/server.py b/tasks/behavior-halve-an-egg-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-halve-an-egg-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-halve-an-egg-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-halve-an-egg-i00-standard/instruction.md b/tasks/behavior-halve-an-egg-i00-standard/instruction.md
index b62253f01b..769dbc986e 100644
--- a/tasks/behavior-halve-an-egg-i00-standard/instruction.md
+++ b/tasks/behavior-halve-an-egg-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Halve the egg. A hard-boiled egg is inside the kitchen refrigerator; a chopping board with a carving knife on it and a plate lie on the countertop, and there is a sink in the kitchen. Cut the egg in half, put both halves on the plate and put the carving knife into the sink. Success means all of the following hold at the same time: (1) both egg halves exist (the egg has been cut); (2) both halves are on top of the plate; (3) the carving knife is inside the sink. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-halve-an-egg-i00-standard/tests/grade.py b/tasks/behavior-halve-an-egg-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-halve-an-egg-i00-standard/tests/grade.py
+++ b/tasks/behavior-halve-an-egg-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-hanging-pictures-i00-privileged/README.md b/tasks/behavior-hanging-pictures-i00-privileged/README.md
index 54b3dc9c96..78d4e86280 100644
--- a/tasks/behavior-hanging-pictures-i00-privileged/README.md
+++ b/tasks/behavior-hanging-pictures-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-hanging-pictures-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-hanging-pictures-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-hanging-pictures-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-hanging-pictures-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-hanging-pictures-i00-privileged/instruction.md b/tasks/behavior-hanging-pictures-i00-privileged/instruction.md
index b8bfee78d6..9131ed6670 100644
--- a/tasks/behavior-hanging-pictures-i00-privileged/instruction.md
+++ b/tasks/behavior-hanging-pictures-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-hanging-pictures-i00-privileged/tests/grade.py b/tasks/behavior-hanging-pictures-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-hanging-pictures-i00-privileged/tests/grade.py
+++ b/tasks/behavior-hanging-pictures-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-hanging-pictures-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-hanging-pictures-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-hanging-pictures-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-hanging-pictures-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-hanging-pictures-i00-standard/README.md b/tasks/behavior-hanging-pictures-i00-standard/README.md
index a107c46f88..2dbb1c2857 100644
--- a/tasks/behavior-hanging-pictures-i00-standard/README.md
+++ b/tasks/behavior-hanging-pictures-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-hanging-pictures-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-hanging-pictures-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-hanging-pictures-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-hanging-pictures-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-hanging-pictures-i00-standard/environment/sim/server.py b/tasks/behavior-hanging-pictures-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-hanging-pictures-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-hanging-pictures-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-hanging-pictures-i00-standard/instruction.md b/tasks/behavior-hanging-pictures-i00-standard/instruction.md
index f993d5edea..c2cff2642e 100644
--- a/tasks/behavior-hanging-pictures-i00-standard/instruction.md
+++ b/tasks/behavior-hanging-pictures-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Hang the poster, which lies on the kitchen countertop, on one of the wall nails in the kitchen. Success means all of the following hold at the same time: (1) the poster is attached to a wall nail (any wall nail in the kitchen). How the simulator judges them: attached(A, B): A is fixed to B through their attachment points; the joint forms by itself when A's attachment point is brought within 5 cm and 15° of a compatible one on B. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-hanging-pictures-i00-standard/tests/grade.py b/tasks/behavior-hanging-pictures-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-hanging-pictures-i00-standard/tests/grade.py
+++ b/tasks/behavior-hanging-pictures-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-privileged/README.md b/tasks/behavior-hiding-Easter-eggs-i00-privileged/README.md
index eca181281d..759709d229 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-privileged/README.md
+++ b/tasks/behavior-hiding-Easter-eggs-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-hiding-Easter-eggs-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-hiding-Easter-eggs-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-privileged/instruction.md b/tasks/behavior-hiding-Easter-eggs-i00-privileged/instruction.md
index 7a7fca3e99..32e8dac06b 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-privileged/instruction.md
+++ b/tasks/behavior-hiding-Easter-eggs-i00-privileged/instruction.md
@@ -69,7 +69,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -89,7 +89,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/grade.py b/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/grade.py
+++ b/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-hiding-Easter-eggs-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-standard/README.md b/tasks/behavior-hiding-Easter-eggs-i00-standard/README.md
index 4c9762d698..b30ace1ce4 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-standard/README.md
+++ b/tasks/behavior-hiding-Easter-eggs-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/server.py b/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-hiding-Easter-eggs-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-standard/instruction.md b/tasks/behavior-hiding-Easter-eggs-i00-standard/instruction.md
index b31b33b8e0..e2a114e31e 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-standard/instruction.md
+++ b/tasks/behavior-hiding-Easter-eggs-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Hide the Easter eggs in the garden. The three eggs are inside the wicker basket on the lawn; take all three out and lay them on the lawn next to one tree (any tree in the garden, but the same tree for all three). Success means all of the following hold at the same time: (1) there is one tree such that all three Easter eggs are next to that tree; (2) no Easter egg is inside the wicker basket; (3) every Easter egg is on top of the lawn. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-hiding-Easter-eggs-i00-standard/tests/grade.py b/tasks/behavior-hiding-Easter-eggs-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-hiding-Easter-eggs-i00-standard/tests/grade.py
+++ b/tasks/behavior-hiding-Easter-eggs-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-installing-a-fax-machine-i00-privileged/README.md b/tasks/behavior-installing-a-fax-machine-i00-privileged/README.md
index e69c405396..c91a316656 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-privileged/README.md
+++ b/tasks/behavior-installing-a-fax-machine-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-a-fax-machine-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-installing-a-fax-machine-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-installing-a-fax-machine-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-fax-machine-i00-privileged/instruction.md b/tasks/behavior-installing-a-fax-machine-i00-privileged/instruction.md
index 67cb883acd..b9a82e7709 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-privileged/instruction.md
+++ b/tasks/behavior-installing-a-fax-machine-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/grade.py b/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/grade.py
+++ b/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-installing-a-fax-machine-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-fax-machine-i00-standard/README.md b/tasks/behavior-installing-a-fax-machine-i00-standard/README.md
index 0ceaf07a10..45d9ca5b7b 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-standard/README.md
+++ b/tasks/behavior-installing-a-fax-machine-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/server.py b/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-installing-a-fax-machine-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-installing-a-fax-machine-i00-standard/instruction.md b/tasks/behavior-installing-a-fax-machine-i00-standard/instruction.md
index ed83eadc40..457cdb73bb 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-standard/instruction.md
+++ b/tasks/behavior-installing-a-fax-machine-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Install the fax machine. A fax machine, switched off, stands on the floor of the shared office; put it on top of one of the carrels (cubicle desks) there and switch it on. Success means all of the following hold at the same time: (1) the fax machine is switched on; (2) the fax machine is on top of a carrel (`carrel.n.02_*`, any of them). How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-installing-a-fax-machine-i00-standard/tests/grade.py b/tasks/behavior-installing-a-fax-machine-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-installing-a-fax-machine-i00-standard/tests/grade.py
+++ b/tasks/behavior-installing-a-fax-machine-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-installing-a-modem-i00-privileged/README.md b/tasks/behavior-installing-a-modem-i00-privileged/README.md
index 687ecd0eb2..34fa77c5d5 100644
--- a/tasks/behavior-installing-a-modem-i00-privileged/README.md
+++ b/tasks/behavior-installing-a-modem-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-a-modem-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-installing-a-modem-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-modem-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-installing-a-modem-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-modem-i00-privileged/instruction.md b/tasks/behavior-installing-a-modem-i00-privileged/instruction.md
index 51774616f5..3cbf0383de 100644
--- a/tasks/behavior-installing-a-modem-i00-privileged/instruction.md
+++ b/tasks/behavior-installing-a-modem-i00-privileged/instruction.md
@@ -60,7 +60,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -80,7 +80,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-installing-a-modem-i00-privileged/tests/grade.py b/tasks/behavior-installing-a-modem-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-installing-a-modem-i00-privileged/tests/grade.py
+++ b/tasks/behavior-installing-a-modem-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-installing-a-modem-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-installing-a-modem-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-modem-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-installing-a-modem-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-modem-i00-standard/README.md b/tasks/behavior-installing-a-modem-i00-standard/README.md
index bfacd895d1..e4a6fe990a 100644
--- a/tasks/behavior-installing-a-modem-i00-standard/README.md
+++ b/tasks/behavior-installing-a-modem-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-a-modem-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-installing-a-modem-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-modem-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-installing-a-modem-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-modem-i00-standard/environment/sim/server.py b/tasks/behavior-installing-a-modem-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-installing-a-modem-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-installing-a-modem-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-installing-a-modem-i00-standard/instruction.md b/tasks/behavior-installing-a-modem-i00-standard/instruction.md
index 37f52391ce..70d4332101 100644
--- a/tasks/behavior-installing-a-modem-i00-standard/instruction.md
+++ b/tasks/behavior-installing-a-modem-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Install the modem. A modem, switched off, sits on the coffee table in the living room; the room also has two cabinets and a television. Switch the modem on and put it on the same cabinet as the television, next to it. Success means all of the following hold at the same time: (1) the modem is switched on; (2) the modem is next to the television; (3) the television and the modem both stand on top of the same cabinet. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-installing-a-modem-i00-standard/tests/grade.py b/tasks/behavior-installing-a-modem-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-installing-a-modem-i00-standard/tests/grade.py
+++ b/tasks/behavior-installing-a-modem-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-installing-a-scanner-i00-privileged/README.md b/tasks/behavior-installing-a-scanner-i00-privileged/README.md
index ab8391f590..e30a6b16cd 100644
--- a/tasks/behavior-installing-a-scanner-i00-privileged/README.md
+++ b/tasks/behavior-installing-a-scanner-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-a-scanner-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-installing-a-scanner-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-scanner-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-installing-a-scanner-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-scanner-i00-privileged/instruction.md b/tasks/behavior-installing-a-scanner-i00-privileged/instruction.md
index f70ba5c2e1..e14604340d 100644
--- a/tasks/behavior-installing-a-scanner-i00-privileged/instruction.md
+++ b/tasks/behavior-installing-a-scanner-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-installing-a-scanner-i00-privileged/tests/grade.py b/tasks/behavior-installing-a-scanner-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-installing-a-scanner-i00-privileged/tests/grade.py
+++ b/tasks/behavior-installing-a-scanner-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-installing-a-scanner-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-installing-a-scanner-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-scanner-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-installing-a-scanner-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-scanner-i00-standard/README.md b/tasks/behavior-installing-a-scanner-i00-standard/README.md
index 15319a2c83..2e043910f2 100644
--- a/tasks/behavior-installing-a-scanner-i00-standard/README.md
+++ b/tasks/behavior-installing-a-scanner-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/server.py b/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-installing-a-scanner-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-installing-a-scanner-i00-standard/instruction.md b/tasks/behavior-installing-a-scanner-i00-standard/instruction.md
index a490c10fc5..0692e45e43 100644
--- a/tasks/behavior-installing-a-scanner-i00-standard/instruction.md
+++ b/tasks/behavior-installing-a-scanner-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** On the table in the private office stand a scanner (switched off) and a laptop; stand the scanner next to the laptop and switch the scanner on. Success means all of the following hold at the same time: (1) the scanner is switched on; (2) the scanner is next to the laptop. How the simulator judges them: nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-installing-a-scanner-i00-standard/tests/grade.py b/tasks/behavior-installing-a-scanner-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-installing-a-scanner-i00-standard/tests/grade.py
+++ b/tasks/behavior-installing-a-scanner-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-installing-smoke-detectors-i00-privileged/README.md b/tasks/behavior-installing-smoke-detectors-i00-privileged/README.md
index e1c962d321..7424bba08c 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-privileged/README.md
+++ b/tasks/behavior-installing-smoke-detectors-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-smoke-detectors-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-installing-smoke-detectors-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-installing-smoke-detectors-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-smoke-detectors-i00-privileged/instruction.md b/tasks/behavior-installing-smoke-detectors-i00-privileged/instruction.md
index b7a45a8c54..049c7aa9d9 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-privileged/instruction.md
+++ b/tasks/behavior-installing-smoke-detectors-i00-privileged/instruction.md
@@ -48,7 +48,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -68,7 +68,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/grade.py b/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/grade.py
+++ b/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-installing-smoke-detectors-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-smoke-detectors-i00-standard/README.md b/tasks/behavior-installing-smoke-detectors-i00-standard/README.md
index 0be13c3a6b..770af9ab9b 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-standard/README.md
+++ b/tasks/behavior-installing-smoke-detectors-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/server.py b/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-installing-smoke-detectors-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-installing-smoke-detectors-i00-standard/instruction.md b/tasks/behavior-installing-smoke-detectors-i00-standard/instruction.md
index f82eaa8cfe..50a441ddc9 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-standard/instruction.md
+++ b/tasks/behavior-installing-smoke-detectors-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Install the smoke detector. A fire alarm lies on the table in the living room; attach it to the wall nail in the living room. Success means all of the following hold at the same time: (1) the fire alarm is attached to the wall nail. How the simulator judges them: attached(A, B): A is fixed to B through their attachment points; the joint forms by itself when A's attachment point is brought within 5 cm and 15° of a compatible one on B. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-installing-smoke-detectors-i00-standard/tests/grade.py b/tasks/behavior-installing-smoke-detectors-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-installing-smoke-detectors-i00-standard/tests/grade.py
+++ b/tasks/behavior-installing-smoke-detectors-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-laying-tile-floors-i00-privileged/README.md b/tasks/behavior-laying-tile-floors-i00-privileged/README.md
index f916349b06..63f5290627 100644
--- a/tasks/behavior-laying-tile-floors-i00-privileged/README.md
+++ b/tasks/behavior-laying-tile-floors-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-laying-tile-floors-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-laying-tile-floors-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-laying-tile-floors-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-laying-tile-floors-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-laying-tile-floors-i00-privileged/instruction.md b/tasks/behavior-laying-tile-floors-i00-privileged/instruction.md
index ee8ee5a90e..84ab96538a 100644
--- a/tasks/behavior-laying-tile-floors-i00-privileged/instruction.md
+++ b/tasks/behavior-laying-tile-floors-i00-privileged/instruction.md
@@ -62,7 +62,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -82,7 +82,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-laying-tile-floors-i00-privileged/tests/grade.py b/tasks/behavior-laying-tile-floors-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-laying-tile-floors-i00-privileged/tests/grade.py
+++ b/tasks/behavior-laying-tile-floors-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-laying-tile-floors-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-laying-tile-floors-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-laying-tile-floors-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-laying-tile-floors-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-laying-tile-floors-i00-standard/README.md b/tasks/behavior-laying-tile-floors-i00-standard/README.md
index 272b83041d..0cf5fb46b2 100644
--- a/tasks/behavior-laying-tile-floors-i00-standard/README.md
+++ b/tasks/behavior-laying-tile-floors-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/server.py b/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-laying-tile-floors-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-laying-tile-floors-i00-standard/instruction.md b/tasks/behavior-laying-tile-floors-i00-standard/instruction.md
index b283927a80..85d7724c0f 100644
--- a/tasks/behavior-laying-tile-floors-i00-standard/instruction.md
+++ b/tasks/behavior-laying-tile-floors-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Lay the tiles. The four tiles lie on the corridor floor; put all four on the bathroom floor, each tile next to at least one of the other tiles. Success means all of the following hold at the same time: (1) all four tiles are on top of the bathroom floor; (2) every tile is next to at least one of the other tiles. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-laying-tile-floors-i00-standard/tests/grade.py b/tasks/behavior-laying-tile-floors-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-laying-tile-floors-i00-standard/tests/grade.py
+++ b/tasks/behavior-laying-tile-floors-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-loading-the-car-i00-privileged/README.md b/tasks/behavior-loading-the-car-i00-privileged/README.md
index 21e8dae732..ebac0d868b 100644
--- a/tasks/behavior-loading-the-car-i00-privileged/README.md
+++ b/tasks/behavior-loading-the-car-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-loading-the-car-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-loading-the-car-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-loading-the-car-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-loading-the-car-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-loading-the-car-i00-privileged/instruction.md b/tasks/behavior-loading-the-car-i00-privileged/instruction.md
index 1fd1eb5895..5257841cf4 100644
--- a/tasks/behavior-loading-the-car-i00-privileged/instruction.md
+++ b/tasks/behavior-loading-the-car-i00-privileged/instruction.md
@@ -57,7 +57,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -77,7 +77,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-loading-the-car-i00-privileged/tests/grade.py b/tasks/behavior-loading-the-car-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-loading-the-car-i00-privileged/tests/grade.py
+++ b/tasks/behavior-loading-the-car-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-loading-the-car-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-loading-the-car-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-loading-the-car-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-loading-the-car-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-loading-the-car-i00-standard/README.md b/tasks/behavior-loading-the-car-i00-standard/README.md
index ce5ca28d66..5cba215e44 100644
--- a/tasks/behavior-loading-the-car-i00-standard/README.md
+++ b/tasks/behavior-loading-the-car-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-loading-the-car-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-loading-the-car-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-loading-the-car-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-loading-the-car-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-loading-the-car-i00-standard/environment/sim/server.py b/tasks/behavior-loading-the-car-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-loading-the-car-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-loading-the-car-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-loading-the-car-i00-standard/instruction.md b/tasks/behavior-loading-the-car-i00-standard/instruction.md
index d36f367288..655fbbe5fa 100644
--- a/tasks/behavior-loading-the-car-i00-standard/instruction.md
+++ b/tasks/behavior-loading-the-car-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Load the car. The car stands in the garage; in the living room a container stands on the floor and a tennis racket and a digital camera lie on the table. Put the camera into the container, and the container and the tennis racket into the car. Success means all of the following hold at the same time: (1) the container is inside the car; (2) the digital camera is inside the container; (3) the tennis racket is inside the car. Whether the car is closed is not checked. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-loading-the-car-i00-standard/tests/grade.py b/tasks/behavior-loading-the-car-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-loading-the-car-i00-standard/tests/grade.py
+++ b/tasks/behavior-loading-the-car-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-make-cabinet-doors-i00-privileged/README.md b/tasks/behavior-make-cabinet-doors-i00-privileged/README.md
index e945d031ca..0f8a3873a0 100644
--- a/tasks/behavior-make-cabinet-doors-i00-privileged/README.md
+++ b/tasks/behavior-make-cabinet-doors-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-cabinet-doors-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-make-cabinet-doors-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-cabinet-doors-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-make-cabinet-doors-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-cabinet-doors-i00-privileged/instruction.md b/tasks/behavior-make-cabinet-doors-i00-privileged/instruction.md
index 1fc8009d73..db0542d958 100644
--- a/tasks/behavior-make-cabinet-doors-i00-privileged/instruction.md
+++ b/tasks/behavior-make-cabinet-doors-i00-privileged/instruction.md
@@ -48,7 +48,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -68,7 +68,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-make-cabinet-doors-i00-privileged/tests/grade.py b/tasks/behavior-make-cabinet-doors-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-make-cabinet-doors-i00-privileged/tests/grade.py
+++ b/tasks/behavior-make-cabinet-doors-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-make-cabinet-doors-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-make-cabinet-doors-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-cabinet-doors-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-make-cabinet-doors-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-cabinet-doors-i00-standard/README.md b/tasks/behavior-make-cabinet-doors-i00-standard/README.md
index 3d81b2f008..39e8f41f23 100644
--- a/tasks/behavior-make-cabinet-doors-i00-standard/README.md
+++ b/tasks/behavior-make-cabinet-doors-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/server.py b/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-make-cabinet-doors-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-make-cabinet-doors-i00-standard/instruction.md b/tasks/behavior-make-cabinet-doors-i00-standard/instruction.md
index ad3b6b403e..8eaa17c5fb 100644
--- a/tasks/behavior-make-cabinet-doors-i00-standard/instruction.md
+++ b/tasks/behavior-make-cabinet-doors-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Make the cabinet door. A cabinet base and a cabinet door lie on the living-room floor; attach the door to the base. Success means all of the following hold at the same time: (1) the cabinet door is attached to the cabinet base. How the simulator judges them: attached(A, B): A is fixed to B through their attachment points; the joint forms by itself when A's attachment point is brought within 5 cm and 15° of a compatible one on B. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-make-cabinet-doors-i00-standard/tests/grade.py b/tasks/behavior-make-cabinet-doors-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-make-cabinet-doors-i00-standard/tests/grade.py
+++ b/tasks/behavior-make-cabinet-doors-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/README.md b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/README.md
index a12de2337d..676b0ba33c 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/README.md
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/instruction.md b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/instruction.md
index a93de76611..c669cf1b5e 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/instruction.md
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/instruction.md
@@ -64,7 +64,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -84,7 +84,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/grade.py b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/grade.py
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/README.md b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/README.md
index 060f2e648e..cb3bdaa258 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/README.md
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/server.py b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/instruction.md b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/instruction.md
index 37c8d131a9..f16140c1e5 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/instruction.md
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Make two gift bags in the living room. The two sacks lie on the breakfast table, the two toy dice stand on the cabinet, and the two wafers are inside that cabinet. Move both sacks onto the coffee table and put one toy die and one wafer into each sack. Success means all of the following hold at the same time: (1) both sacks are on top of the coffee table; (2) each sack holds a different one of the two toy dice, one die inside each sack; (3) each sack holds a different one of the two wafers, one wafer inside each sack. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/tests/grade.py b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/tests/grade.py
+++ b/tasks/behavior-make-gift-bags-for-baby-showers-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-make-microwave-popcorn-i00-privileged/README.md b/tasks/behavior-make-microwave-popcorn-i00-privileged/README.md
index 57dcdfaebf..30d1d7f299 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-privileged/README.md
+++ b/tasks/behavior-make-microwave-popcorn-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-microwave-popcorn-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-make-microwave-popcorn-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-make-microwave-popcorn-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-microwave-popcorn-i00-privileged/instruction.md b/tasks/behavior-make-microwave-popcorn-i00-privileged/instruction.md
index 8b7c10658a..1137d95f4a 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-privileged/instruction.md
+++ b/tasks/behavior-make-microwave-popcorn-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/grade.py b/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/grade.py
+++ b/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-make-microwave-popcorn-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-microwave-popcorn-i00-standard/README.md b/tasks/behavior-make-microwave-popcorn-i00-standard/README.md
index 49830e512e..032bef85ae 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-standard/README.md
+++ b/tasks/behavior-make-microwave-popcorn-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/server.py b/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-make-microwave-popcorn-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-make-microwave-popcorn-i00-standard/instruction.md b/tasks/behavior-make-microwave-popcorn-i00-standard/instruction.md
index 1b8e1078b6..89c29a2a31 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-standard/instruction.md
+++ b/tasks/behavior-make-microwave-popcorn-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Make microwave popcorn. A bag of popcorn kernels lies on the kitchen countertop and there is a microwave in the kitchen; heat the bag in the microwave until the popcorn is cooked, so that the cooked (popped) popcorn ends up inside the bag. Success means all of the following hold at the same time: (1) cooked popcorn exists (the kernels have popped); (2) the popcorn bag contains the cooked popcorn. How the simulator judges them: contains(A, S): at least one particle of the substance S lies inside A's container volume. real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-make-microwave-popcorn-i00-standard/tests/grade.py b/tasks/behavior-make-microwave-popcorn-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-make-microwave-popcorn-i00-standard/tests/grade.py
+++ b/tasks/behavior-make-microwave-popcorn-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-make-pizza-i00-privileged/README.md b/tasks/behavior-make-pizza-i00-privileged/README.md
index 34a6fc9b3c..52eded9af0 100644
--- a/tasks/behavior-make-pizza-i00-privileged/README.md
+++ b/tasks/behavior-make-pizza-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-pizza-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-make-pizza-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-pizza-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-make-pizza-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-pizza-i00-privileged/instruction.md b/tasks/behavior-make-pizza-i00-privileged/instruction.md
index 505434d59f..698e30cc1e 100644
--- a/tasks/behavior-make-pizza-i00-privileged/instruction.md
+++ b/tasks/behavior-make-pizza-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-make-pizza-i00-privileged/tests/grade.py b/tasks/behavior-make-pizza-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-make-pizza-i00-privileged/tests/grade.py
+++ b/tasks/behavior-make-pizza-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-make-pizza-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-make-pizza-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-pizza-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-make-pizza-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-pizza-i00-standard/README.md b/tasks/behavior-make-pizza-i00-standard/README.md
index 4eefee16a2..0d2bb3ae1b 100644
--- a/tasks/behavior-make-pizza-i00-standard/README.md
+++ b/tasks/behavior-make-pizza-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-pizza-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-make-pizza-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-pizza-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-make-pizza-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-pizza-i00-standard/environment/sim/server.py b/tasks/behavior-make-pizza-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-make-pizza-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-make-pizza-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-make-pizza-i00-standard/instruction.md b/tasks/behavior-make-pizza-i00-standard/instruction.md
index 6f7883adaf..4d9b49a8a1 100644
--- a/tasks/behavior-make-pizza-i00-standard/instruction.md
+++ b/tasks/behavior-make-pizza-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Make a pizza in the kitchen. The pizza dough lies on the cookie sheet on the countertop; in the refrigerator are three tupperwares, one filled with grated cheese, one holding four pepperoni slices and one holding two mushrooms; a Vidalia onion lies on the chopping board, and a carving knife and a bowl lie on the countertop. Top the dough with the cheese, the pepperoni, the mushrooms cut in half and the diced onion, and bake it in the oven until it turns into a pizza; leave the pizza on the cookie sheet. Success means all of the following hold at the same time: (1) a pizza exists (the simulator's recipe has turned the ingredients into one); (2) the pizza is on top of the cookie sheet. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-make-pizza-i00-standard/tests/grade.py b/tasks/behavior-make-pizza-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-make-pizza-i00-standard/tests/grade.py
+++ b/tasks/behavior-make-pizza-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-make-rose-centerpieces-i00-privileged/README.md b/tasks/behavior-make-rose-centerpieces-i00-privileged/README.md
index 80e20664a3..5480362f8a 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-privileged/README.md
+++ b/tasks/behavior-make-rose-centerpieces-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-rose-centerpieces-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-make-rose-centerpieces-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-make-rose-centerpieces-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-rose-centerpieces-i00-privileged/instruction.md b/tasks/behavior-make-rose-centerpieces-i00-privileged/instruction.md
index 7dcc10d028..f73a321b36 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-privileged/instruction.md
+++ b/tasks/behavior-make-rose-centerpieces-i00-privileged/instruction.md
@@ -53,7 +53,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -73,7 +73,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/grade.py b/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/grade.py
+++ b/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-make-rose-centerpieces-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-rose-centerpieces-i00-standard/README.md b/tasks/behavior-make-rose-centerpieces-i00-standard/README.md
index 21396308da..9ad6596271 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-standard/README.md
+++ b/tasks/behavior-make-rose-centerpieces-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/server.py b/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-make-rose-centerpieces-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-make-rose-centerpieces-i00-standard/instruction.md b/tasks/behavior-make-rose-centerpieces-i00-standard/instruction.md
index 67d6959686..c4680ff5ed 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-standard/instruction.md
+++ b/tasks/behavior-make-rose-centerpieces-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Make a centerpiece. The vase and three roses lie on the cabinet in the living room; put all three roses into the vase and stand the vase on the living-room coffee table. Success means all of the following hold at the same time: (1) each of the three roses is inside the vase; (2) the vase is on top of the coffee table. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-make-rose-centerpieces-i00-standard/tests/grade.py b/tasks/behavior-make-rose-centerpieces-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-make-rose-centerpieces-i00-standard/tests/grade.py
+++ b/tasks/behavior-make-rose-centerpieces-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-privileged/README.md b/tasks/behavior-moving-boxes-to-storage-i00-privileged/README.md
index 14a1d63eeb..f4dc485937 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-privileged/README.md
+++ b/tasks/behavior-moving-boxes-to-storage-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-moving-boxes-to-storage-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-moving-boxes-to-storage-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-privileged/instruction.md b/tasks/behavior-moving-boxes-to-storage-i00-privileged/instruction.md
index 4b2bcfaa2f..e5ef3d3fa4 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-privileged/instruction.md
+++ b/tasks/behavior-moving-boxes-to-storage-i00-privileged/instruction.md
@@ -57,7 +57,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -77,7 +77,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/grade.py b/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/grade.py
+++ b/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-moving-boxes-to-storage-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-standard/README.md b/tasks/behavior-moving-boxes-to-storage-i00-standard/README.md
index 29e7c83b0d..f03bfe79f3 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-standard/README.md
+++ b/tasks/behavior-moving-boxes-to-storage-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/server.py b/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-moving-boxes-to-storage-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-standard/instruction.md b/tasks/behavior-moving-boxes-to-storage-i00-standard/instruction.md
index c3e9cc12d8..fa27192a10 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-standard/instruction.md
+++ b/tasks/behavior-moving-boxes-to-storage-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Move the two storage containers, which stand on the living-room floor, to the garage: put one on the garage floor and stack the other on top of it (either order). Success means all of the following hold at the same time: (1) one storage container is on top of the garage floor and the other one is on top of it. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-moving-boxes-to-storage-i00-standard/tests/grade.py b/tasks/behavior-moving-boxes-to-storage-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-moving-boxes-to-storage-i00-standard/tests/grade.py
+++ b/tasks/behavior-moving-boxes-to-storage-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-organizing-art-supplies-i00-privileged/README.md b/tasks/behavior-organizing-art-supplies-i00-privileged/README.md
index fb3313a945..153fc94eef 100644
--- a/tasks/behavior-organizing-art-supplies-i00-privileged/README.md
+++ b/tasks/behavior-organizing-art-supplies-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-organizing-art-supplies-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-organizing-art-supplies-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-organizing-art-supplies-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-organizing-art-supplies-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-organizing-art-supplies-i00-privileged/instruction.md b/tasks/behavior-organizing-art-supplies-i00-privileged/instruction.md
index d98a7333fb..caf2ba60e8 100644
--- a/tasks/behavior-organizing-art-supplies-i00-privileged/instruction.md
+++ b/tasks/behavior-organizing-art-supplies-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-organizing-art-supplies-i00-privileged/tests/grade.py b/tasks/behavior-organizing-art-supplies-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-organizing-art-supplies-i00-privileged/tests/grade.py
+++ b/tasks/behavior-organizing-art-supplies-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-organizing-art-supplies-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-organizing-art-supplies-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-organizing-art-supplies-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-organizing-art-supplies-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-organizing-art-supplies-i00-standard/README.md b/tasks/behavior-organizing-art-supplies-i00-standard/README.md
index 0e816231e8..a048bb630d 100644
--- a/tasks/behavior-organizing-art-supplies-i00-standard/README.md
+++ b/tasks/behavior-organizing-art-supplies-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/server.py b/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-organizing-art-supplies-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-organizing-art-supplies-i00-standard/instruction.md b/tasks/behavior-organizing-art-supplies-i00-standard/instruction.md
index 0dd22a436e..ee5666415f 100644
--- a/tasks/behavior-organizing-art-supplies-i00-standard/instruction.md
+++ b/tasks/behavior-organizing-art-supplies-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** In the bedroom, pack the art supplies lying on the desk (a glue stick, a rubber eraser, a paintbrush and a marker) into the carryall, which stands on the floor, and put the carryall on the desk. Success means all of the following hold at the same time: (1) the glue stick, the rubber eraser, the paintbrush and the marker are each inside the carryall; (2) the carryall is on top of the desk. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-organizing-art-supplies-i00-standard/tests/grade.py b/tasks/behavior-organizing-art-supplies-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-organizing-art-supplies-i00-standard/tests/grade.py
+++ b/tasks/behavior-organizing-art-supplies-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-organizing-school-stuff-i00-privileged/README.md b/tasks/behavior-organizing-school-stuff-i00-privileged/README.md
index b0d7730cac..7fc2541708 100644
--- a/tasks/behavior-organizing-school-stuff-i00-privileged/README.md
+++ b/tasks/behavior-organizing-school-stuff-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-organizing-school-stuff-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-organizing-school-stuff-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-organizing-school-stuff-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-organizing-school-stuff-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-organizing-school-stuff-i00-privileged/instruction.md b/tasks/behavior-organizing-school-stuff-i00-privileged/instruction.md
index e9561023c2..dfdc226ed0 100644
--- a/tasks/behavior-organizing-school-stuff-i00-privileged/instruction.md
+++ b/tasks/behavior-organizing-school-stuff-i00-privileged/instruction.md
@@ -55,7 +55,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -75,7 +75,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-organizing-school-stuff-i00-privileged/tests/grade.py b/tasks/behavior-organizing-school-stuff-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-organizing-school-stuff-i00-privileged/tests/grade.py
+++ b/tasks/behavior-organizing-school-stuff-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-organizing-school-stuff-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-organizing-school-stuff-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-organizing-school-stuff-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-organizing-school-stuff-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-organizing-school-stuff-i00-standard/README.md b/tasks/behavior-organizing-school-stuff-i00-standard/README.md
index e157d3560d..aa08ebc48e 100644
--- a/tasks/behavior-organizing-school-stuff-i00-standard/README.md
+++ b/tasks/behavior-organizing-school-stuff-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/server.py b/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-organizing-school-stuff-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-organizing-school-stuff-i00-standard/instruction.md b/tasks/behavior-organizing-school-stuff-i00-standard/instruction.md
index 4680871e26..329f515505 100644
--- a/tasks/behavior-organizing-school-stuff-i00-standard/instruction.md
+++ b/tasks/behavior-organizing-school-stuff-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Pack the school things in the bedroom. A pencil, a book and a folder lie on the bed; a pen, a calculator and the carryall are on the floor. Put all five things into the carryall and put the carryall on the bed. Success means all of the following hold at the same time: (1) the folder, the book, the pencil, the pen and the calculator are inside the carryall; (2) the carryall is on top of the bed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-organizing-school-stuff-i00-standard/tests/grade.py b/tasks/behavior-organizing-school-stuff-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-organizing-school-stuff-i00-standard/tests/grade.py
+++ b/tasks/behavior-organizing-school-stuff-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/README.md b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/README.md
index df2a214ca6..5cf486abd4 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/README.md
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/README.md
@@ -49,3 +49,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/instruction.md b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/instruction.md
index 07fc15d3ef..b34c517761 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/instruction.md
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/instruction.md
@@ -64,7 +64,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -84,7 +84,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/grade.py b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/grade.py
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/README.md b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/README.md
index fcbd17e2c0..f3bd222875 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/README.md
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/server.py b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/instruction.md b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/instruction.md
index b6efbc1149..92660be941 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/instruction.md
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Pack the toolbox in the utility room. The drill, the pliers, the flashlight, the allen wrench and the screwdriver lie on the table there, next to the toolbox. Put all five tools inside the toolbox, keep the toolbox on the table, and close it. Success means all of the following hold at the same time: (1) the drill is inside the toolbox; (2) the pliers are inside the toolbox; (3) the flashlight is inside the toolbox; (4) the allen wrench is inside the toolbox; (5) the screwdriver is inside the toolbox; (6) the toolbox is on top of the table; (7) the toolbox is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/tests/grade.py b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-outfit-a-basic-toolbox-i00-standard/tests/grade.py
+++ b/tasks/behavior-outfit-a-basic-toolbox-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-privileged/README.md b/tasks/behavior-packing-meal-for-delivery-i00-privileged/README.md
index eb83544cb7..00a8682381 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-privileged/README.md
+++ b/tasks/behavior-packing-meal-for-delivery-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-packing-meal-for-delivery-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-packing-meal-for-delivery-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-privileged/instruction.md b/tasks/behavior-packing-meal-for-delivery-i00-privileged/instruction.md
index ec678a393b..13f930e697 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-privileged/instruction.md
+++ b/tasks/behavior-packing-meal-for-delivery-i00-privileged/instruction.md
@@ -58,7 +58,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -78,7 +78,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/grade.py b/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/grade.py
+++ b/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-packing-meal-for-delivery-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-standard/README.md b/tasks/behavior-packing-meal-for-delivery-i00-standard/README.md
index 48372fd0f4..90384841ad 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-standard/README.md
+++ b/tasks/behavior-packing-meal-for-delivery-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/server.py b/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-packing-meal-for-delivery-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-standard/instruction.md b/tasks/behavior-packing-meal-for-delivery-i00-standard/instruction.md
index 24429d588b..7742d46c97 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-standard/instruction.md
+++ b/tasks/behavior-packing-meal-for-delivery-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Pack three hamburgers for delivery. The three wrapped hamburgers lie on a tray on the kitchen countertop, next to three sacks and a storage container; put each hamburger into its own sack and stand all three sacks on top of the storage container. Success means all of the following hold at the same time: (1) each wrapped hamburger is inside a different sack: one hamburger per sack; (2) every sack is on top of the storage container. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-packing-meal-for-delivery-i00-standard/tests/grade.py b/tasks/behavior-packing-meal-for-delivery-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-packing-meal-for-delivery-i00-standard/tests/grade.py
+++ b/tasks/behavior-packing-meal-for-delivery-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-picking-up-toys-i00-privileged/README.md b/tasks/behavior-picking-up-toys-i00-privileged/README.md
index cc9f582125..4b5304b1d0 100644
--- a/tasks/behavior-picking-up-toys-i00-privileged/README.md
+++ b/tasks/behavior-picking-up-toys-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-picking-up-toys-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-picking-up-toys-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-picking-up-toys-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-picking-up-toys-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-picking-up-toys-i00-privileged/instruction.md b/tasks/behavior-picking-up-toys-i00-privileged/instruction.md
index c0dd3643ed..8d52001f72 100644
--- a/tasks/behavior-picking-up-toys-i00-privileged/instruction.md
+++ b/tasks/behavior-picking-up-toys-i00-privileged/instruction.md
@@ -68,7 +68,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -88,7 +88,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-picking-up-toys-i00-privileged/tests/grade.py b/tasks/behavior-picking-up-toys-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-picking-up-toys-i00-privileged/tests/grade.py
+++ b/tasks/behavior-picking-up-toys-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-picking-up-toys-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-picking-up-toys-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-picking-up-toys-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-picking-up-toys-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-picking-up-toys-i00-standard/README.md b/tasks/behavior-picking-up-toys-i00-standard/README.md
index 22edf317b0..47bd2584ec 100644
--- a/tasks/behavior-picking-up-toys-i00-standard/README.md
+++ b/tasks/behavior-picking-up-toys-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-picking-up-toys-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-picking-up-toys-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-picking-up-toys-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-picking-up-toys-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-picking-up-toys-i00-standard/environment/sim/server.py b/tasks/behavior-picking-up-toys-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-picking-up-toys-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-picking-up-toys-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-picking-up-toys-i00-standard/instruction.md b/tasks/behavior-picking-up-toys-i00-standard/instruction.md
index 22ed8a32ca..77bae84638 100644
--- a/tasks/behavior-picking-up-toys-i00-standard/instruction.md
+++ b/tasks/behavior-picking-up-toys-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Pick up the toys in the child's room. Two board games lie on the bed; the third board game, two jigsaw puzzles, a tennis ball and the toy box are on the table. Put all six toys inside the toy box. Success means all of the following hold at the same time: (1) all three board games, both jigsaw puzzles and the tennis ball are inside the toy box. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-picking-up-toys-i00-standard/tests/grade.py b/tasks/behavior-picking-up-toys-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-picking-up-toys-i00-standard/tests/grade.py
+++ b/tasks/behavior-picking-up-toys-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-picking-up-trash-i00-privileged/README.md b/tasks/behavior-picking-up-trash-i00-privileged/README.md
index 7a1a6d1969..706d421215 100644
--- a/tasks/behavior-picking-up-trash-i00-privileged/README.md
+++ b/tasks/behavior-picking-up-trash-i00-privileged/README.md
@@ -53,3 +53,4 @@ Oracle `partial`: the reference solution scored 1 on earlier versions of this ta
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-picking-up-trash-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-picking-up-trash-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-picking-up-trash-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-picking-up-trash-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-picking-up-trash-i00-privileged/instruction.md b/tasks/behavior-picking-up-trash-i00-privileged/instruction.md
index 3947f3520d..fb34f02023 100644
--- a/tasks/behavior-picking-up-trash-i00-privileged/instruction.md
+++ b/tasks/behavior-picking-up-trash-i00-privileged/instruction.md
@@ -47,7 +47,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -67,7 +67,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-picking-up-trash-i00-privileged/tests/grade.py b/tasks/behavior-picking-up-trash-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-picking-up-trash-i00-privileged/tests/grade.py
+++ b/tasks/behavior-picking-up-trash-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-picking-up-trash-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-picking-up-trash-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-picking-up-trash-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-picking-up-trash-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-picking-up-trash-i00-standard/README.md b/tasks/behavior-picking-up-trash-i00-standard/README.md
index e003713435..8886a8ef14 100644
--- a/tasks/behavior-picking-up-trash-i00-standard/README.md
+++ b/tasks/behavior-picking-up-trash-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-picking-up-trash-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-picking-up-trash-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-picking-up-trash-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-picking-up-trash-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-picking-up-trash-i00-standard/environment/sim/server.py b/tasks/behavior-picking-up-trash-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-picking-up-trash-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-picking-up-trash-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-picking-up-trash-i00-standard/instruction.md b/tasks/behavior-picking-up-trash-i00-standard/instruction.md
index 46c6e2fc10..ef51a6ad2b 100644
--- a/tasks/behavior-picking-up-trash-i00-standard/instruction.md
+++ b/tasks/behavior-picking-up-trash-i00-standard/instruction.md
@@ -6,8 +6,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
picking_up_trash: every can inside the trash can). The service checks it and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-picking-up-trash-i00-standard/tests/grade.py b/tasks/behavior-picking-up-trash-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-picking-up-trash-i00-standard/tests/grade.py
+++ b/tasks/behavior-picking-up-trash-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-polishing-shoes-i00-privileged/README.md b/tasks/behavior-polishing-shoes-i00-privileged/README.md
index 6139f89552..4fc43e7f86 100644
--- a/tasks/behavior-polishing-shoes-i00-privileged/README.md
+++ b/tasks/behavior-polishing-shoes-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-polishing-shoes-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-polishing-shoes-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-polishing-shoes-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-polishing-shoes-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-polishing-shoes-i00-privileged/instruction.md b/tasks/behavior-polishing-shoes-i00-privileged/instruction.md
index 75e447ab30..717472bb3f 100644
--- a/tasks/behavior-polishing-shoes-i00-privileged/instruction.md
+++ b/tasks/behavior-polishing-shoes-i00-privileged/instruction.md
@@ -66,7 +66,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -86,7 +86,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-polishing-shoes-i00-privileged/tests/grade.py b/tasks/behavior-polishing-shoes-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-polishing-shoes-i00-privileged/tests/grade.py
+++ b/tasks/behavior-polishing-shoes-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-polishing-shoes-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-polishing-shoes-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-polishing-shoes-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-polishing-shoes-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-polishing-shoes-i00-standard/README.md b/tasks/behavior-polishing-shoes-i00-standard/README.md
index afa9628a58..50334407d3 100644
--- a/tasks/behavior-polishing-shoes-i00-standard/README.md
+++ b/tasks/behavior-polishing-shoes-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-polishing-shoes-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-polishing-shoes-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-polishing-shoes-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-polishing-shoes-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-polishing-shoes-i00-standard/environment/sim/server.py b/tasks/behavior-polishing-shoes-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-polishing-shoes-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-polishing-shoes-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-polishing-shoes-i00-standard/instruction.md b/tasks/behavior-polishing-shoes-i00-standard/instruction.md
index eb71c7d49e..76121210fb 100644
--- a/tasks/behavior-polishing-shoes-i00-standard/instruction.md
+++ b/tasks/behavior-polishing-shoes-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Polish the shoes in the bedroom. Two dusty shoes lie on the bedroom floor and a scrub brush lies on the stand; there are two footstools in the room. Brush all the dust off both shoes, set them next to each other and next to the same footstool, and leave the scrub brush on the stand. Success means all of the following hold at the same time: (1) no dust is left on either shoe; (2) the two shoes are next to each other, and both are next to the same footstool; (3) the scrub brush is on top of the stand. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-polishing-shoes-i00-standard/tests/grade.py b/tasks/behavior-polishing-shoes-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-polishing-shoes-i00-standard/tests/grade.py
+++ b/tasks/behavior-polishing-shoes-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-preparing-lunch-box-i00-privileged/README.md b/tasks/behavior-preparing-lunch-box-i00-privileged/README.md
index 39a427c05d..02ec3e85b0 100644
--- a/tasks/behavior-preparing-lunch-box-i00-privileged/README.md
+++ b/tasks/behavior-preparing-lunch-box-i00-privileged/README.md
@@ -47,3 +47,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-preparing-lunch-box-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-preparing-lunch-box-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-preparing-lunch-box-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-preparing-lunch-box-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-preparing-lunch-box-i00-privileged/instruction.md b/tasks/behavior-preparing-lunch-box-i00-privileged/instruction.md
index 575face7bc..d7fb6ed7fd 100644
--- a/tasks/behavior-preparing-lunch-box-i00-privileged/instruction.md
+++ b/tasks/behavior-preparing-lunch-box-i00-privileged/instruction.md
@@ -62,7 +62,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -82,7 +82,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-preparing-lunch-box-i00-privileged/tests/grade.py b/tasks/behavior-preparing-lunch-box-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-preparing-lunch-box-i00-privileged/tests/grade.py
+++ b/tasks/behavior-preparing-lunch-box-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-preparing-lunch-box-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-preparing-lunch-box-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-preparing-lunch-box-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-preparing-lunch-box-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-preparing-lunch-box-i00-standard/README.md b/tasks/behavior-preparing-lunch-box-i00-standard/README.md
index abc4124ec0..51c60c9bba 100644
--- a/tasks/behavior-preparing-lunch-box-i00-standard/README.md
+++ b/tasks/behavior-preparing-lunch-box-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/server.py b/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-preparing-lunch-box-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-preparing-lunch-box-i00-standard/instruction.md b/tasks/behavior-preparing-lunch-box-i00-standard/instruction.md
index 20d1632966..179edb022e 100644
--- a/tasks/behavior-preparing-lunch-box-i00-standard/instruction.md
+++ b/tasks/behavior-preparing-lunch-box-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Pack the lunch box on the kitchen countertop. The two apple halves, the club sandwich and the chocolate chip cookie lie on the chopping board on the countertop; the bottle of tea is inside the kitchen refrigerator. Put all five into the packing box and leave the refrigerator closed. Success means all of the following hold at the same time: (1) both apple halves are inside the packing box; (2) the club sandwich is inside the packing box; (3) the chocolate chip cookie is inside the packing box; (4) the bottle of tea is inside the packing box; (5) the refrigerator is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-preparing-lunch-box-i00-standard/tests/grade.py b/tasks/behavior-preparing-lunch-box-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-preparing-lunch-box-i00-standard/tests/grade.py
+++ b/tasks/behavior-preparing-lunch-box-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/README.md b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/README.md
index 5ae3804caf..98d8527cc7 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/README.md
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/instruction.md b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/instruction.md
index 0156a26203..f771d2a2d2 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/instruction.md
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/instruction.md
@@ -57,7 +57,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -77,7 +77,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/grade.py b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/grade.py
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/README.md b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/README.md
index 3ecaf68fda..bc88169ee2 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/README.md
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/server.py b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/instruction.md b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/instruction.md
index de2e839d01..48819440af 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/instruction.md
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** In the garage, put the pruner and the shears, which lie on the floor, inside the toolbox, which also stands on the floor, and close the toolbox; the toolbox stays on the floor. Success means all of the following hold at the same time: (1) the toolbox is on top of the garage floor; (2) the pruner and the shears are inside the toolbox; (3) the toolbox is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/tests/grade.py b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/tests/grade.py
+++ b/tasks/behavior-put-together-a-basic-pruning-kit-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/README.md b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/README.md
index c972667fe1..bc1bf11610 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/README.md
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/instruction.md b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/instruction.md
index dbd112b431..28c4b4d20c 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/instruction.md
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/instruction.md
@@ -75,7 +75,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -95,7 +95,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/grade.py b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/grade.py
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/README.md b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/README.md
index 5f7a4bbac0..a075e56ce7 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/README.md
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/server.py b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/instruction.md b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/instruction.md
index f29e381c41..6d4be89174 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/instruction.md
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the Halloween decorations away. Two pumpkins, three candles and a cauldron stand on the living-room floor. Put the pumpkins and the candles inside the living-room cabinets (any of them), close every living-room cabinet, and leave the cauldron next to a living-room table. Success means all of the following hold at the same time: (1) both pumpkins and all three candles are inside living-room cabinets; (2) the cauldron is next to a living-room table; (3) every living-room cabinet is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/tests/grade.py b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-putting-away-Halloween-decorations-i00-standard/tests/grade.py
+++ b/tasks/behavior-putting-away-Halloween-decorations-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-putting-away-toys-i00-privileged/README.md b/tasks/behavior-putting-away-toys-i00-privileged/README.md
index a56179170a..b5119ee859 100644
--- a/tasks/behavior-putting-away-toys-i00-privileged/README.md
+++ b/tasks/behavior-putting-away-toys-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-away-toys-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-putting-away-toys-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-away-toys-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-putting-away-toys-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-away-toys-i00-privileged/instruction.md b/tasks/behavior-putting-away-toys-i00-privileged/instruction.md
index ec8a747847..2e7c98d6ab 100644
--- a/tasks/behavior-putting-away-toys-i00-privileged/instruction.md
+++ b/tasks/behavior-putting-away-toys-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-putting-away-toys-i00-privileged/tests/grade.py b/tasks/behavior-putting-away-toys-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-putting-away-toys-i00-privileged/tests/grade.py
+++ b/tasks/behavior-putting-away-toys-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-putting-away-toys-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-putting-away-toys-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-away-toys-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-putting-away-toys-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-away-toys-i00-standard/README.md b/tasks/behavior-putting-away-toys-i00-standard/README.md
index 7afe376853..9a67c51269 100644
--- a/tasks/behavior-putting-away-toys-i00-standard/README.md
+++ b/tasks/behavior-putting-away-toys-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-away-toys-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-putting-away-toys-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-away-toys-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-putting-away-toys-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-away-toys-i00-standard/environment/sim/server.py b/tasks/behavior-putting-away-toys-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-putting-away-toys-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-putting-away-toys-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-putting-away-toys-i00-standard/instruction.md b/tasks/behavior-putting-away-toys-i00-standard/instruction.md
index cb380b713e..cd50092a66 100644
--- a/tasks/behavior-putting-away-toys-i00-standard/instruction.md
+++ b/tasks/behavior-putting-away-toys-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the toys away. Eight toy figures lie on the floor, four in the living room and four in the dining room; one toy box stands on the living-room floor and another on the dining-room table. Put every toy figure inside a toy box (either box). Success means all of the following hold at the same time: (1) every toy figure is inside a toy box. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-putting-away-toys-i00-standard/tests/grade.py b/tasks/behavior-putting-away-toys-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-putting-away-toys-i00-standard/tests/grade.py
+++ b/tasks/behavior-putting-away-toys-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/README.md b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/README.md
index 2ffba9da36..0618197555 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/README.md
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/instruction.md b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/instruction.md
index fd8689538a..209904b0fb 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/instruction.md
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/grade.py b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/grade.py
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/README.md b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/README.md
index 242aac941f..f5c079fe87 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/README.md
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/server.py b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/instruction.md b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/instruction.md
index 9aa67bfae0..1570a335ad 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/instruction.md
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Clear the dirty dishes. Two bowls and two plates stand on the booth in the dining room; put all four into the sink in the kitchen (the dirt on them does not matter). Success means all of the following hold at the same time: (1) both bowls are inside the sink; (2) both plates are inside the sink. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/tests/grade.py b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/tests/grade.py
+++ b/tasks/behavior-putting-dirty-dishes-in-sink-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/README.md b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/README.md
index e73f132ec1..1c8f84e876 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/README.md
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/instruction.md b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/instruction.md
index 7605418ce2..09a5838cdd 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/instruction.md
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/instruction.md
@@ -62,7 +62,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -82,7 +82,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/grade.py b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/grade.py
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/README.md b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/README.md
index 5b4f0d171f..8f1670243a 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/README.md
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/server.py b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/instruction.md b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/instruction.md
index 7a8808ee0e..390605d27c 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/instruction.md
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the clean dishes away. Eight plates lie on the two kitchen countertops, four on each; put all eight inside one and the same kitchen cabinet, and leave every kitchen cabinet closed. Success means all of the following hold at the same time: (1) all eight plates are inside one and the same cabinet; (2) every kitchen cabinet is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/tests/grade.py b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/tests/grade.py
+++ b/tasks/behavior-putting-dishes-away-after-cleaning-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-privileged/README.md b/tasks/behavior-putting-shoes-on-rack-i00-privileged/README.md
index 27df27fe38..119bc54686 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-privileged/README.md
+++ b/tasks/behavior-putting-shoes-on-rack-i00-privileged/README.md
@@ -40,3 +40,4 @@ Oracle `partial`: the reference solution scored 1 on earlier versions of this ta
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-putting-shoes-on-rack-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-putting-shoes-on-rack-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-privileged/instruction.md b/tasks/behavior-putting-shoes-on-rack-i00-privileged/instruction.md
index 7364febd2d..3db2f163f8 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-privileged/instruction.md
+++ b/tasks/behavior-putting-shoes-on-rack-i00-privileged/instruction.md
@@ -66,7 +66,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -86,7 +86,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/grade.py b/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/grade.py
+++ b/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-putting-shoes-on-rack-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-standard/README.md b/tasks/behavior-putting-shoes-on-rack-i00-standard/README.md
index d7096c23cb..621c09ced7 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-standard/README.md
+++ b/tasks/behavior-putting-shoes-on-rack-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/server.py b/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-putting-shoes-on-rack-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-standard/instruction.md b/tasks/behavior-putting-shoes-on-rack-i00-standard/instruction.md
index a078b4391c..a81544d764 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-standard/instruction.md
+++ b/tasks/behavior-putting-shoes-on-rack-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the two pairs of shoes on the hall tree. Two gym shoes and two sandals lie on the corridor floor; the hall tree stands in an alcove at one end of the corridor: a low open shoe cabinet with a flat top, under a tall back panel with two small shelves. Every shoe must touch the hall tree and not the floor, and the two gym shoes must be next to each other, and so must the two sandals: the gap between the two shoes' axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions (about 6 cm for the gym shoes, 5 cm for the sandals), and nothing lies between them along a horizontal axis (BEHAVIOR's goal for putting_shoes_on_rack). The service checks it and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-putting-shoes-on-rack-i00-standard/tests/grade.py b/tasks/behavior-putting-shoes-on-rack-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-putting-shoes-on-rack-i00-standard/tests/grade.py
+++ b/tasks/behavior-putting-shoes-on-rack-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/README.md b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/README.md
index 89f495364f..d0e115b219 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/README.md
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/README.md
@@ -47,3 +47,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/instruction.md b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/instruction.md
index 374ed24775..54bb5efd98 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/instruction.md
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/instruction.md
@@ -92,7 +92,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -112,7 +112,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/grade.py b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/grade.py
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/README.md b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/README.md
index 7cbaa6057b..4890402c14 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/README.md
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/server.py b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/instruction.md b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/instruction.md
index a762239a08..f8f738b9d3 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/instruction.md
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Decorate the house for Christmas. In the living room stand a Christmas tree, three gift boxes and a wicker basket holding a wreath, three candy canes and two pillar candles. Put the gift boxes by the tree, both candles on one dining-room table, one candy cane on a table, and the wreath and the two other candy canes on a sofa. Success means all of the following hold at the same time: (1) every gift box is next to, under or touching the Christmas tree; (2) both pillar candles are on top of one and the same table; (3) there is a table with exactly one candy cane on top of it; (4) the wreath is on top of a sofa; (5) there is a sofa with exactly two candy canes on top of it. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. under(A, B): B is directly above A (and not below it). touching(A, B): A and B are in physical contact. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/tests/grade.py b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/tests/grade.py
+++ b/tasks/behavior-putting-up-Christmas-decorations-inside-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-re-shelving-library-books-i00-privileged/README.md b/tasks/behavior-re-shelving-library-books-i00-privileged/README.md
index c6aebed32f..4466c349ee 100644
--- a/tasks/behavior-re-shelving-library-books-i00-privileged/README.md
+++ b/tasks/behavior-re-shelving-library-books-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-re-shelving-library-books-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-re-shelving-library-books-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-re-shelving-library-books-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-re-shelving-library-books-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-re-shelving-library-books-i00-privileged/instruction.md b/tasks/behavior-re-shelving-library-books-i00-privileged/instruction.md
index 0676b33a1c..82184557f9 100644
--- a/tasks/behavior-re-shelving-library-books-i00-privileged/instruction.md
+++ b/tasks/behavior-re-shelving-library-books-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-re-shelving-library-books-i00-privileged/tests/grade.py b/tasks/behavior-re-shelving-library-books-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-re-shelving-library-books-i00-privileged/tests/grade.py
+++ b/tasks/behavior-re-shelving-library-books-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-re-shelving-library-books-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-re-shelving-library-books-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-re-shelving-library-books-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-re-shelving-library-books-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-re-shelving-library-books-i00-standard/README.md b/tasks/behavior-re-shelving-library-books-i00-standard/README.md
index f4b1c097c2..d8e89d5df1 100644
--- a/tasks/behavior-re-shelving-library-books-i00-standard/README.md
+++ b/tasks/behavior-re-shelving-library-books-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/server.py b/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-re-shelving-library-books-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-re-shelving-library-books-i00-standard/instruction.md b/tasks/behavior-re-shelving-library-books-i00-standard/instruction.md
index 5f5d104cf2..6871319352 100644
--- a/tasks/behavior-re-shelving-library-books-i00-standard/instruction.md
+++ b/tasks/behavior-re-shelving-library-books-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Reshelve the library books. Three books lie on the table in the living room; put every one of them inside a bookcase in the living room (the books may go into different bookcases). Success means all of the following hold at the same time: (1) every book is inside some bookcase (`bookcase.n.01_*`; different bookcases are fine). How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-re-shelving-library-books-i00-standard/tests/grade.py b/tasks/behavior-re-shelving-library-books-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-re-shelving-library-books-i00-standard/tests/grade.py
+++ b/tasks/behavior-re-shelving-library-books-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-rearrange-your-room-i00-privileged/README.md b/tasks/behavior-rearrange-your-room-i00-privileged/README.md
index ba3e60e842..c4bfdd73fe 100644
--- a/tasks/behavior-rearrange-your-room-i00-privileged/README.md
+++ b/tasks/behavior-rearrange-your-room-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-rearrange-your-room-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-rearrange-your-room-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-rearrange-your-room-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-rearrange-your-room-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-rearrange-your-room-i00-privileged/instruction.md b/tasks/behavior-rearrange-your-room-i00-privileged/instruction.md
index 03aa9e0da8..5c1426d295 100644
--- a/tasks/behavior-rearrange-your-room-i00-privileged/instruction.md
+++ b/tasks/behavior-rearrange-your-room-i00-privileged/instruction.md
@@ -57,7 +57,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -77,7 +77,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-rearrange-your-room-i00-privileged/tests/grade.py b/tasks/behavior-rearrange-your-room-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-rearrange-your-room-i00-privileged/tests/grade.py
+++ b/tasks/behavior-rearrange-your-room-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-rearrange-your-room-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-rearrange-your-room-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-rearrange-your-room-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-rearrange-your-room-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-rearrange-your-room-i00-standard/README.md b/tasks/behavior-rearrange-your-room-i00-standard/README.md
index 8d16bbb344..da879c78fa 100644
--- a/tasks/behavior-rearrange-your-room-i00-standard/README.md
+++ b/tasks/behavior-rearrange-your-room-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/server.py b/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-rearrange-your-room-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-rearrange-your-room-i00-standard/instruction.md b/tasks/behavior-rearrange-your-room-i00-standard/instruction.md
index 827dd7bc35..9e52c102f0 100644
--- a/tasks/behavior-rearrange-your-room-i00-standard/instruction.md
+++ b/tasks/behavior-rearrange-your-room-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Rearrange the bedroom. Move the tissue dispenser from the armchair onto one of the stands, and put the two pillows that lie on the floor onto the two beds, one pillow on each bed. Success means all of the following hold at the same time: (1) the tissue dispenser is on top of a stand; (2) each bed has a different one of the two pillows on top of it, one pillow per bed. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-rearrange-your-room-i00-standard/tests/grade.py b/tasks/behavior-rearrange-your-room-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-rearrange-your-room-i00-standard/tests/grade.py
+++ b/tasks/behavior-rearrange-your-room-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/README.md b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/README.md
index 99f466dd47..804ee6f254 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/README.md
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/instruction.md b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/instruction.md
index c1b09b0412..ab9bae7aa5 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/instruction.md
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/instruction.md
@@ -60,7 +60,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -80,7 +80,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/grade.py b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/grade.py
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/README.md b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/README.md
index 3416bd4391..e1e7e37790 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/README.md
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/server.py b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/instruction.md b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/instruction.md
index fb0fbf3a3d..348269ae85 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/instruction.md
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the toaster, the food processor and the French press, which stand on the kitchen countertop, away into one kitchen cabinet, and close that cabinet. Success means all of the following hold at the same time: (1) the toaster, the food processor and the French press are all inside one and the same cabinet; (2) that cabinet is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/tests/grade.py b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-rearranging-kitchen-furniture-i00-standard/tests/grade.py
+++ b/tasks/behavior-rearranging-kitchen-furniture-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/README.md b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/README.md
index 39e138a4af..7311024175 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/README.md
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/instruction.md b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/instruction.md
index 8d5daf42f5..fc56c1bd32 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/instruction.md
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/instruction.md
@@ -50,7 +50,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -70,7 +70,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/grade.py b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/grade.py
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/README.md b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/README.md
index 6ab232f740..a4d3690f0b 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/README.md
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/server.py b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/instruction.md b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/instruction.md
index fe01d03a7e..8b79575ed9 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/instruction.md
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Scrub the bathroom floor. The bathroom floor is covered with dirt and a scrub brush lies on it; remove every bit of dirt from the floor. Success means all of the following hold at the same time: (1) no dirt is left on the bathroom floor. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/tests/grade.py b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-scrubbing-bathroom-floor-i00-standard/tests/grade.py
+++ b/tasks/behavior-scrubbing-bathroom-floor-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/README.md b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/README.md
index adbf3f91d5..f1225f655a 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/README.md
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/README.md
@@ -48,3 +48,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/instruction.md b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/instruction.md
index 4e2fe02b5f..7a512a6f78 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/instruction.md
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/instruction.md
@@ -59,7 +59,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -79,7 +79,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/grade.py b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/grade.py
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/README.md b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/README.md
index c3ae313a48..33998ba032 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/README.md
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/server.py b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/instruction.md b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/instruction.md
index b26223882c..f95237b071 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/instruction.md
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Set up a coffee station on the kitchen countertop. The coffee maker stays on the countertop; bring the bottle of coffee from the kitchen shelf to stand next to it, put the paper coffee filter on top of the coffee maker, stand the saucer next to the coffee maker with the coffee cup on the saucer, and stand the electric kettle next to the coffee maker. Success means all of the following hold at the same time: (1) the coffee maker is on top of the countertop; (2) the bottle of coffee is next to the coffee maker; (3) the paper coffee filter is on top of the coffee maker; (4) the saucer is next to the coffee maker; (5) the coffee cup is on top of the saucer; (6) the electric kettle is next to the coffee maker. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/tests/grade.py b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/tests/grade.py
+++ b/tasks/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-setting-mousetraps-i00-privileged/README.md b/tasks/behavior-setting-mousetraps-i00-privileged/README.md
index ba7e661204..0f87b6e3fb 100644
--- a/tasks/behavior-setting-mousetraps-i00-privileged/README.md
+++ b/tasks/behavior-setting-mousetraps-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-setting-mousetraps-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-setting-mousetraps-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-mousetraps-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-setting-mousetraps-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-mousetraps-i00-privileged/instruction.md b/tasks/behavior-setting-mousetraps-i00-privileged/instruction.md
index 25a6e827a9..810e33746b 100644
--- a/tasks/behavior-setting-mousetraps-i00-privileged/instruction.md
+++ b/tasks/behavior-setting-mousetraps-i00-privileged/instruction.md
@@ -68,7 +68,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -88,7 +88,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-setting-mousetraps-i00-privileged/tests/grade.py b/tasks/behavior-setting-mousetraps-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-setting-mousetraps-i00-privileged/tests/grade.py
+++ b/tasks/behavior-setting-mousetraps-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-setting-mousetraps-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-setting-mousetraps-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-mousetraps-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-setting-mousetraps-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-mousetraps-i00-standard/README.md b/tasks/behavior-setting-mousetraps-i00-standard/README.md
index e8435ea527..63c83ec474 100644
--- a/tasks/behavior-setting-mousetraps-i00-standard/README.md
+++ b/tasks/behavior-setting-mousetraps-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/server.py b/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-setting-mousetraps-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-setting-mousetraps-i00-standard/instruction.md b/tasks/behavior-setting-mousetraps-i00-standard/instruction.md
index c0a50b4999..525a34a262 100644
--- a/tasks/behavior-setting-mousetraps-i00-standard/instruction.md
+++ b/tasks/behavior-setting-mousetraps-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Set the four mousetraps, which lie on the bathroom cabinet, on the bathroom floor, with exactly two of them under or next to one of the bathroom sinks. Success means all of the following hold at the same time: (1) all four mousetraps are on top of one and the same floor; (2) for one of the sinks, exactly two mousetraps (not three, not four) are each under that sink or next to it. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. under(A, B): B is directly above A (and not below it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-setting-mousetraps-i00-standard/tests/grade.py b/tasks/behavior-setting-mousetraps-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-setting-mousetraps-i00-standard/tests/grade.py
+++ b/tasks/behavior-setting-mousetraps-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-setting-the-fire-i00-privileged/README.md b/tasks/behavior-setting-the-fire-i00-privileged/README.md
index 600a4fb10d..629173cc17 100644
--- a/tasks/behavior-setting-the-fire-i00-privileged/README.md
+++ b/tasks/behavior-setting-the-fire-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-setting-the-fire-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-setting-the-fire-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-the-fire-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-setting-the-fire-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-the-fire-i00-privileged/instruction.md b/tasks/behavior-setting-the-fire-i00-privileged/instruction.md
index d09049fdaf..845780c0c1 100644
--- a/tasks/behavior-setting-the-fire-i00-privileged/instruction.md
+++ b/tasks/behavior-setting-the-fire-i00-privileged/instruction.md
@@ -64,7 +64,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -84,7 +84,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-setting-the-fire-i00-privileged/tests/grade.py b/tasks/behavior-setting-the-fire-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-setting-the-fire-i00-privileged/tests/grade.py
+++ b/tasks/behavior-setting-the-fire-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-setting-the-fire-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-setting-the-fire-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-the-fire-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-setting-the-fire-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-the-fire-i00-standard/README.md b/tasks/behavior-setting-the-fire-i00-standard/README.md
index f911eb3e12..5364263be3 100644
--- a/tasks/behavior-setting-the-fire-i00-standard/README.md
+++ b/tasks/behavior-setting-the-fire-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-setting-the-fire-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-setting-the-fire-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-the-fire-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-setting-the-fire-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-the-fire-i00-standard/environment/sim/server.py b/tasks/behavior-setting-the-fire-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-setting-the-fire-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-setting-the-fire-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-setting-the-fire-i00-standard/instruction.md b/tasks/behavior-setting-the-fire-i00-standard/instruction.md
index b069dc2e73..3324df6b96 100644
--- a/tasks/behavior-setting-the-fire-i00-standard/instruction.md
+++ b/tasks/behavior-setting-the-fire-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Light a fire in the living-room fireplace. Two pieces of firewood lie on the floor, and a newspaper and a cigar lighter lie on the table; put the newspaper inside the fireplace with both pieces of firewood on top of it, set the newspaper and both pieces of firewood on fire, and switch the lighter off again. Success means all of the following hold at the same time: (1) both pieces of firewood are on fire, on top of the newspaper and inside the fireplace; (2) the newspaper is on fire; (3) the cigar lighter is not switched on. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. on_fire(A): A's temperature has reached its ignition temperature (250 °C by default); once lit, it stays on fire and heats what is near it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-setting-the-fire-i00-standard/tests/grade.py b/tasks/behavior-setting-the-fire-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-setting-the-fire-i00-standard/tests/grade.py
+++ b/tasks/behavior-setting-the-fire-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-setting-the-table-i00-privileged/README.md b/tasks/behavior-setting-the-table-i00-privileged/README.md
index 7cc2c5676f..7acf53d3df 100644
--- a/tasks/behavior-setting-the-table-i00-privileged/README.md
+++ b/tasks/behavior-setting-the-table-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-setting-the-table-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-setting-the-table-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-the-table-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-setting-the-table-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-the-table-i00-privileged/instruction.md b/tasks/behavior-setting-the-table-i00-privileged/instruction.md
index 8dcee4799a..aa1292c4aa 100644
--- a/tasks/behavior-setting-the-table-i00-privileged/instruction.md
+++ b/tasks/behavior-setting-the-table-i00-privileged/instruction.md
@@ -70,7 +70,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -90,7 +90,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-setting-the-table-i00-privileged/tests/grade.py b/tasks/behavior-setting-the-table-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-setting-the-table-i00-privileged/tests/grade.py
+++ b/tasks/behavior-setting-the-table-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-setting-the-table-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-setting-the-table-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-the-table-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-setting-the-table-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-the-table-i00-standard/README.md b/tasks/behavior-setting-the-table-i00-standard/README.md
index 922e900861..48d7aa10b2 100644
--- a/tasks/behavior-setting-the-table-i00-standard/README.md
+++ b/tasks/behavior-setting-the-table-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-setting-the-table-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-setting-the-table-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setting-the-table-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-setting-the-table-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setting-the-table-i00-standard/environment/sim/server.py b/tasks/behavior-setting-the-table-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-setting-the-table-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-setting-the-table-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-setting-the-table-i00-standard/instruction.md b/tasks/behavior-setting-the-table-i00-standard/instruction.md
index 29f25eeedd..57592dad9e 100644
--- a/tasks/behavior-setting-the-table-i00-standard/instruction.md
+++ b/tasks/behavior-setting-the-table-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Set the dining-room breakfast table for two. The two plates are inside a kitchen cabinet, the two cupcakes inside the kitchen refrigerator, and two forks and two table knives lie on the kitchen sink. Put both plates on the breakfast table, one cupcake on each plate, and one fork and one knife next to each plate. Success means all of the following hold at the same time: (1) both plates are on top of the breakfast table; (2) each cupcake is on top of a different plate: one cupcake per plate; (3) each fork is next to a different plate: one fork per plate; (4) each table knife is next to a different plate: one knife per plate. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-setting-the-table-i00-standard/tests/grade.py b/tasks/behavior-setting-the-table-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-setting-the-table-i00-standard/tests/grade.py
+++ b/tasks/behavior-setting-the-table-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/README.md b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/README.md
index 31721f3e27..b8768ef10f 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/README.md
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/README.md
@@ -49,3 +49,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/instruction.md b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/instruction.md
index f59652b052..cc25459c94 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/instruction.md
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/instruction.md
@@ -83,7 +83,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -103,7 +103,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/grade.py b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/grade.py
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/README.md b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/README.md
index e72eaec259..d81030767a 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/README.md
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/server.py b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/instruction.md b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/instruction.md
index 2594eed94a..04dad6a350 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/instruction.md
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Set up the bar. On the cabinet in the bar stand three cans of soda, a tray with six ice cubes, an ice bucket, a corkscrew, a wine bottle and two wine glasses. Put the wine bottle on the bar countertop; put the three cans on that countertop, each next to another can; put all six ice cubes inside the bucket and the bucket on the countertop; put both wine glasses on the countertop next to each other, at least one of them next to the wine bottle; and put the corkscrew on the countertop next to the wine bottle. Success means all of the following hold at the same time: (1) the wine bottle is on top of the bar countertop; (2) each of the three cans of soda is on top of the countertop and next to another one of the cans; (3) all six ice cubes are inside the bucket; (4) the bucket is on top of the countertop; (5) both wine glasses are on top of the countertop and next to each other; (6) at least one of the wine glasses is next to the wine bottle; (7) the corkscrew is on top of the countertop and next to the wine bottle. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/tests/grade.py b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/tests/grade.py
+++ b/tasks/behavior-setup-a-bar-for-a-cocktail-party-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-slicing-vegetables-i00-privileged/README.md b/tasks/behavior-slicing-vegetables-i00-privileged/README.md
index f17a1dc63d..9ba89ab462 100644
--- a/tasks/behavior-slicing-vegetables-i00-privileged/README.md
+++ b/tasks/behavior-slicing-vegetables-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-slicing-vegetables-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-slicing-vegetables-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-slicing-vegetables-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-slicing-vegetables-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-slicing-vegetables-i00-privileged/instruction.md b/tasks/behavior-slicing-vegetables-i00-privileged/instruction.md
index 88a8070a41..a0eb3a40bc 100644
--- a/tasks/behavior-slicing-vegetables-i00-privileged/instruction.md
+++ b/tasks/behavior-slicing-vegetables-i00-privileged/instruction.md
@@ -74,7 +74,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -94,7 +94,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-slicing-vegetables-i00-privileged/tests/grade.py b/tasks/behavior-slicing-vegetables-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-slicing-vegetables-i00-privileged/tests/grade.py
+++ b/tasks/behavior-slicing-vegetables-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-slicing-vegetables-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-slicing-vegetables-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-slicing-vegetables-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-slicing-vegetables-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-slicing-vegetables-i00-standard/README.md b/tasks/behavior-slicing-vegetables-i00-standard/README.md
index 58c61f5ec9..520dabf590 100644
--- a/tasks/behavior-slicing-vegetables-i00-standard/README.md
+++ b/tasks/behavior-slicing-vegetables-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/server.py b/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-slicing-vegetables-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-slicing-vegetables-i00-standard/instruction.md b/tasks/behavior-slicing-vegetables-i00-standard/instruction.md
index 8d13ecff8e..f1b11d3c51 100644
--- a/tasks/behavior-slicing-vegetables-i00-standard/instruction.md
+++ b/tasks/behavior-slicing-vegetables-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Dice the vegetables in the kitchen. Two bell peppers, two beets and a zucchini are inside the refrigerator; a paring knife and two chopping boards lie on the countertop. Dice all five vegetables, so that none of them is left whole, and leave the refrigerator closed. Success means all of the following hold at the same time: (1) diced bell pepper, diced beet and diced zucchini exist; (2) no whole bell pepper, beet or zucchini is left (every one has been cut); (3) the refrigerator is closed. How the simulator judges them: open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. real(A): A exists in the simulation. What the BDDL problem declares future (halves, diced pieces, cooked food, a dish) does not exist at the start: the simulator's transition rules create it. A sliceable object touching the blade of an active slicer (a knife, an axe; after a cut the blade rests for 2 s) is replaced by its two halves, so the whole one is no longer real; a diceable half touching the blade turns into diced pieces (particles); and a recipe's ingredients, heated together in their container or vessel on or in an active heat source, turn into the cooked food or the dish. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-slicing-vegetables-i00-standard/tests/grade.py b/tasks/behavior-slicing-vegetables-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-slicing-vegetables-i00-standard/tests/grade.py
+++ b/tasks/behavior-slicing-vegetables-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-privileged/README.md b/tasks/behavior-sorting-books-on-shelf-i00-privileged/README.md
index b2bcc1934f..bc43d415f0 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-privileged/README.md
+++ b/tasks/behavior-sorting-books-on-shelf-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-sorting-books-on-shelf-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-sorting-books-on-shelf-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-privileged/instruction.md b/tasks/behavior-sorting-books-on-shelf-i00-privileged/instruction.md
index 21a4ba771e..0f67641648 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-privileged/instruction.md
+++ b/tasks/behavior-sorting-books-on-shelf-i00-privileged/instruction.md
@@ -86,7 +86,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -106,7 +106,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/grade.py b/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/grade.py
+++ b/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-sorting-books-on-shelf-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-standard/README.md b/tasks/behavior-sorting-books-on-shelf-i00-standard/README.md
index cdf5141d92..1c7a1bb510 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-standard/README.md
+++ b/tasks/behavior-sorting-books-on-shelf-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/server.py b/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-sorting-books-on-shelf-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-standard/instruction.md b/tasks/behavior-sorting-books-on-shelf-i00-standard/instruction.md
index 978f9cde36..cab63b8cd8 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-standard/instruction.md
+++ b/tasks/behavior-sorting-books-on-shelf-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Sort the books in the living-room bookcase into stacks by kind. There are three comic books, two notebooks and two hardbacks; some are inside the bookcase and some are lying on top of books of another kind. Keep all seven inside the bookcase, stack the three comic books together, lay one notebook on the other, and lay one hardback on the other. Success means all of the following hold at the same time: (1) every comic book, notebook and hardback is inside the bookcase; (2) exactly two of the three comic books each lie on top of another comic book (for example, all three stacked in one pile); (3) one notebook lies on top of the other notebook; (4) one hardback lies on top of the other hardback. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-sorting-books-on-shelf-i00-standard/tests/grade.py b/tasks/behavior-sorting-books-on-shelf-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-sorting-books-on-shelf-i00-standard/tests/grade.py
+++ b/tasks/behavior-sorting-books-on-shelf-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/README.md b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/README.md
index f60f530907..3470e02275 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/README.md
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/instruction.md b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/instruction.md
index 736835e84c..a1da2484d9 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/instruction.md
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/instruction.md
@@ -104,7 +104,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -124,7 +124,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/grade.py b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/grade.py
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/README.md b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/README.md
index c407da985e..43497ebaf6 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/README.md
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/server.py b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/instruction.md b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/instruction.md
index ee50bdeb87..d45bc9c57b 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/instruction.md
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Sort the recycling in the kitchen. Three buckets stand on the kitchen floor; two wine bottles, two cans of soda, a newspaper and a magazine lie around the kitchen, some on the countertop and some on the floor. Sort them into the buckets: both wine bottles into one bucket, both cans into a second one, and the newspaper and the magazine into the third, with nothing of another kind in any of them. Success means all of the following hold at the same time: (1) both wine bottles are inside the same bucket, together with no can of soda, newspaper or magazine; (2) both cans of soda are inside the same other bucket, together with no wine bottle, newspaper or magazine; (3) the newspaper and the magazine are inside the same third bucket, together with no can of soda or wine bottle. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/tests/grade.py b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/tests/grade.py
+++ b/tasks/behavior-sorting-bottles-cans-and-paper-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-sorting-household-items-i00-privileged/README.md b/tasks/behavior-sorting-household-items-i00-privileged/README.md
index e7f45ee9d2..1468ac3098 100644
--- a/tasks/behavior-sorting-household-items-i00-privileged/README.md
+++ b/tasks/behavior-sorting-household-items-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-household-items-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-sorting-household-items-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-household-items-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-sorting-household-items-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-household-items-i00-privileged/instruction.md b/tasks/behavior-sorting-household-items-i00-privileged/instruction.md
index 9d669cd056..9b2f043867 100644
--- a/tasks/behavior-sorting-household-items-i00-privileged/instruction.md
+++ b/tasks/behavior-sorting-household-items-i00-privileged/instruction.md
@@ -63,7 +63,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -83,7 +83,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-sorting-household-items-i00-privileged/tests/grade.py b/tasks/behavior-sorting-household-items-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-sorting-household-items-i00-privileged/tests/grade.py
+++ b/tasks/behavior-sorting-household-items-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-sorting-household-items-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-sorting-household-items-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-household-items-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-sorting-household-items-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-household-items-i00-standard/README.md b/tasks/behavior-sorting-household-items-i00-standard/README.md
index a4e0d5d130..6fc4df3906 100644
--- a/tasks/behavior-sorting-household-items-i00-standard/README.md
+++ b/tasks/behavior-sorting-household-items-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-household-items-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-sorting-household-items-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-household-items-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-sorting-household-items-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-household-items-i00-standard/environment/sim/server.py b/tasks/behavior-sorting-household-items-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-sorting-household-items-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-sorting-household-items-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-sorting-household-items-i00-standard/instruction.md b/tasks/behavior-sorting-household-items-i00-standard/instruction.md
index aec2820337..1e2db53c8b 100644
--- a/tasks/behavior-sorting-household-items-i00-standard/instruction.md
+++ b/tasks/behavior-sorting-household-items-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Sort the household items into the bathroom. Two baskets stand on the bedroom floor: one holds two bottles of detergent and a box of sanitary napkins, the other a soap dispenser, a tube of toothpaste and a toothbrush; a cup stands on the bathroom sink. Put both detergent bottles under the bathroom sink, next to each other; the box of sanitary napkins on the bathroom shelf; the soap dispenser on the sink; the toothbrush into the cup, which stays on the sink; and the toothpaste next to the cup. Success means all of the following hold at the same time: (1) both detergent bottles are under the sink and next to each other; (2) the box of sanitary napkins is on top of the shelf; (3) the soap dispenser and the cup are on top of the sink; (4) the toothbrush is inside the cup and the tube of toothpaste is next to the cup. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. under(A, B): B is directly above A (and not below it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-sorting-household-items-i00-standard/tests/grade.py b/tasks/behavior-sorting-household-items-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-sorting-household-items-i00-standard/tests/grade.py
+++ b/tasks/behavior-sorting-household-items-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-sorting-vegetables-i00-privileged/README.md b/tasks/behavior-sorting-vegetables-i00-privileged/README.md
index 6b1f839405..c27afa3390 100644
--- a/tasks/behavior-sorting-vegetables-i00-privileged/README.md
+++ b/tasks/behavior-sorting-vegetables-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-vegetables-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-sorting-vegetables-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-vegetables-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-sorting-vegetables-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-vegetables-i00-privileged/instruction.md b/tasks/behavior-sorting-vegetables-i00-privileged/instruction.md
index e646653289..6f7a9bb5d7 100644
--- a/tasks/behavior-sorting-vegetables-i00-privileged/instruction.md
+++ b/tasks/behavior-sorting-vegetables-i00-privileged/instruction.md
@@ -85,7 +85,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -105,7 +105,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-sorting-vegetables-i00-privileged/tests/grade.py b/tasks/behavior-sorting-vegetables-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-sorting-vegetables-i00-privileged/tests/grade.py
+++ b/tasks/behavior-sorting-vegetables-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-sorting-vegetables-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-sorting-vegetables-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-vegetables-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-sorting-vegetables-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-vegetables-i00-standard/README.md b/tasks/behavior-sorting-vegetables-i00-standard/README.md
index 3755a0da9f..7dbf92054c 100644
--- a/tasks/behavior-sorting-vegetables-i00-standard/README.md
+++ b/tasks/behavior-sorting-vegetables-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/server.py b/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-sorting-vegetables-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-sorting-vegetables-i00-standard/instruction.md b/tasks/behavior-sorting-vegetables-i00-standard/instruction.md
index 5cacd9a6df..62bebd07aa 100644
--- a/tasks/behavior-sorting-vegetables-i00-standard/instruction.md
+++ b/tasks/behavior-sorting-vegetables-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Sort the vegetables in the kitchen. Two wicker baskets stand on the kitchen floor, one with three bok choy and three ears of sweet corn, the other with two broccoli, two leeks and three Vidalia onions; three mixing bowls stand on the countertop. Put the bok choy and the onions together into one mixing bowl, the leeks and the broccoli together into a second one, and the sweet corn into a third. Success means all of the following hold at the same time: (1) one mixing bowl holds all three bok choy and all three Vidalia onions; (2) one mixing bowl holds both leeks and both broccoli; (3) one mixing bowl holds all three ears of sweet corn. The three groups need not end up in three different bowls; the check asks for one bowl per group. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-sorting-vegetables-i00-standard/tests/grade.py b/tasks/behavior-sorting-vegetables-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-sorting-vegetables-i00-standard/tests/grade.py
+++ b/tasks/behavior-sorting-vegetables-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-spraying-for-bugs-i00-privileged/README.md b/tasks/behavior-spraying-for-bugs-i00-privileged/README.md
index 8156b8353a..7270e51e64 100644
--- a/tasks/behavior-spraying-for-bugs-i00-privileged/README.md
+++ b/tasks/behavior-spraying-for-bugs-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-spraying-for-bugs-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-spraying-for-bugs-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-spraying-for-bugs-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-spraying-for-bugs-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-spraying-for-bugs-i00-privileged/instruction.md b/tasks/behavior-spraying-for-bugs-i00-privileged/instruction.md
index 743516efe6..c26643433b 100644
--- a/tasks/behavior-spraying-for-bugs-i00-privileged/instruction.md
+++ b/tasks/behavior-spraying-for-bugs-i00-privileged/instruction.md
@@ -51,7 +51,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -71,7 +71,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-spraying-for-bugs-i00-privileged/tests/grade.py b/tasks/behavior-spraying-for-bugs-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-spraying-for-bugs-i00-privileged/tests/grade.py
+++ b/tasks/behavior-spraying-for-bugs-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-spraying-for-bugs-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-spraying-for-bugs-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-spraying-for-bugs-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-spraying-for-bugs-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-spraying-for-bugs-i00-standard/README.md b/tasks/behavior-spraying-for-bugs-i00-standard/README.md
index b8d0f43715..698d34abf6 100644
--- a/tasks/behavior-spraying-for-bugs-i00-standard/README.md
+++ b/tasks/behavior-spraying-for-bugs-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/server.py b/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-spraying-for-bugs-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-spraying-for-bugs-i00-standard/instruction.md b/tasks/behavior-spraying-for-bugs-i00-standard/instruction.md
index c6fb133144..c16b9af2cb 100644
--- a/tasks/behavior-spraying-for-bugs-i00-standard/instruction.md
+++ b/tasks/behavior-spraying-for-bugs-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Spray the potted plants against bugs. An insectifuge atomizer and two potted plants stand on the garden floor; spray insectifuge onto both plants until each of them is covered with it. Success means all of the following hold at the same time: (1) both potted plants are covered with insectifuge. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-spraying-for-bugs-i00-standard/tests/grade.py b/tasks/behavior-spraying-for-bugs-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-spraying-for-bugs-i00-standard/tests/grade.py
+++ b/tasks/behavior-spraying-for-bugs-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-spraying-fruit-trees-i00-privileged/README.md b/tasks/behavior-spraying-fruit-trees-i00-privileged/README.md
index a21ee5e9c5..d8a04a0b42 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-privileged/README.md
+++ b/tasks/behavior-spraying-fruit-trees-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-spraying-fruit-trees-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-spraying-fruit-trees-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-spraying-fruit-trees-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-spraying-fruit-trees-i00-privileged/instruction.md b/tasks/behavior-spraying-fruit-trees-i00-privileged/instruction.md
index 1dcecf0b61..286199726c 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-privileged/instruction.md
+++ b/tasks/behavior-spraying-fruit-trees-i00-privileged/instruction.md
@@ -49,7 +49,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -69,7 +69,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/grade.py b/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/grade.py
+++ b/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-spraying-fruit-trees-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-spraying-fruit-trees-i00-standard/README.md b/tasks/behavior-spraying-fruit-trees-i00-standard/README.md
index c7259b7008..a246a72128 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-standard/README.md
+++ b/tasks/behavior-spraying-fruit-trees-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/server.py b/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-spraying-fruit-trees-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-spraying-fruit-trees-i00-standard/instruction.md b/tasks/behavior-spraying-fruit-trees-i00-standard/instruction.md
index faca7d8a4b..8894747ab1 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-standard/instruction.md
+++ b/tasks/behavior-spraying-fruit-trees-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Spray the fruit trees. A pesticide atomizer lies on the garden floor near two trees; spray pesticide onto both trees until each of them is covered with it. Success means all of the following hold at the same time: (1) both trees are covered with pesticide. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-spraying-fruit-trees-i00-standard/tests/grade.py b/tasks/behavior-spraying-fruit-trees-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-spraying-fruit-trees-i00-standard/tests/grade.py
+++ b/tasks/behavior-spraying-fruit-trees-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-stacking-wood-i00-privileged/README.md b/tasks/behavior-stacking-wood-i00-privileged/README.md
index 3b8ff14e60..ee3a063ff8 100644
--- a/tasks/behavior-stacking-wood-i00-privileged/README.md
+++ b/tasks/behavior-stacking-wood-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-stacking-wood-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-stacking-wood-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-stacking-wood-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-stacking-wood-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-stacking-wood-i00-privileged/instruction.md b/tasks/behavior-stacking-wood-i00-privileged/instruction.md
index 1cebddc746..ab14a7b317 100644
--- a/tasks/behavior-stacking-wood-i00-privileged/instruction.md
+++ b/tasks/behavior-stacking-wood-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-stacking-wood-i00-privileged/tests/grade.py b/tasks/behavior-stacking-wood-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-stacking-wood-i00-privileged/tests/grade.py
+++ b/tasks/behavior-stacking-wood-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-stacking-wood-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-stacking-wood-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-stacking-wood-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-stacking-wood-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-stacking-wood-i00-standard/README.md b/tasks/behavior-stacking-wood-i00-standard/README.md
index fa13e2456b..c481314b6d 100644
--- a/tasks/behavior-stacking-wood-i00-standard/README.md
+++ b/tasks/behavior-stacking-wood-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-stacking-wood-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-stacking-wood-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-stacking-wood-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-stacking-wood-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-stacking-wood-i00-standard/environment/sim/server.py b/tasks/behavior-stacking-wood-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-stacking-wood-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-stacking-wood-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-stacking-wood-i00-standard/instruction.md b/tasks/behavior-stacking-wood-i00-standard/instruction.md
index 450d31648d..16cee44a1c 100644
--- a/tasks/behavior-stacking-wood-i00-standard/instruction.md
+++ b/tasks/behavior-stacking-wood-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Six logs lie spread out on the driveway in the garden; stack them so that every log touches at least one other log. Success means all of the following hold at the same time: (1) every log is touching at least one other log. How the simulator judges them: touching(A, B): A and B are in physical contact. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-stacking-wood-i00-standard/tests/grade.py b/tasks/behavior-stacking-wood-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-stacking-wood-i00-standard/tests/grade.py
+++ b/tasks/behavior-stacking-wood-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-store-batteries-i00-privileged/README.md b/tasks/behavior-store-batteries-i00-privileged/README.md
index 39fa420432..3d17debdde 100644
--- a/tasks/behavior-store-batteries-i00-privileged/README.md
+++ b/tasks/behavior-store-batteries-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-store-batteries-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-store-batteries-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-batteries-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-store-batteries-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-batteries-i00-privileged/instruction.md b/tasks/behavior-store-batteries-i00-privileged/instruction.md
index 14543ca5bc..b0e2c32719 100644
--- a/tasks/behavior-store-batteries-i00-privileged/instruction.md
+++ b/tasks/behavior-store-batteries-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-store-batteries-i00-privileged/tests/grade.py b/tasks/behavior-store-batteries-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-store-batteries-i00-privileged/tests/grade.py
+++ b/tasks/behavior-store-batteries-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-store-batteries-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-store-batteries-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-batteries-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-store-batteries-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-batteries-i00-standard/README.md b/tasks/behavior-store-batteries-i00-standard/README.md
index 8e195aacc5..aefce06f30 100644
--- a/tasks/behavior-store-batteries-i00-standard/README.md
+++ b/tasks/behavior-store-batteries-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-store-batteries-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-store-batteries-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-batteries-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-store-batteries-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-batteries-i00-standard/environment/sim/server.py b/tasks/behavior-store-batteries-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-store-batteries-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-store-batteries-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-store-batteries-i00-standard/instruction.md b/tasks/behavior-store-batteries-i00-standard/instruction.md
index 3f27dac99a..adabafc478 100644
--- a/tasks/behavior-store-batteries-i00-standard/instruction.md
+++ b/tasks/behavior-store-batteries-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Store the batteries. Three batteries lie around the house, two on the coffee table in the living room and one on the kitchen countertop; put all three inside one of the two cabinets in the living room (all in the same one). Success means all of the following hold at the same time: (1) all three batteries are inside one and the same cabinet. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-store-batteries-i00-standard/tests/grade.py b/tasks/behavior-store-batteries-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-store-batteries-i00-standard/tests/grade.py
+++ b/tasks/behavior-store-batteries-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-store-honey-i00-privileged/README.md b/tasks/behavior-store-honey-i00-privileged/README.md
index e23f1b8b1b..64821984fc 100644
--- a/tasks/behavior-store-honey-i00-privileged/README.md
+++ b/tasks/behavior-store-honey-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-store-honey-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-store-honey-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-honey-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-store-honey-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-honey-i00-privileged/instruction.md b/tasks/behavior-store-honey-i00-privileged/instruction.md
index c756009fbc..ed7dc8d204 100644
--- a/tasks/behavior-store-honey-i00-privileged/instruction.md
+++ b/tasks/behavior-store-honey-i00-privileged/instruction.md
@@ -48,7 +48,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -68,7 +68,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-store-honey-i00-privileged/tests/grade.py b/tasks/behavior-store-honey-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-store-honey-i00-privileged/tests/grade.py
+++ b/tasks/behavior-store-honey-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-store-honey-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-store-honey-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-honey-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-store-honey-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-honey-i00-standard/README.md b/tasks/behavior-store-honey-i00-standard/README.md
index 64bc55e69d..1763c49dc5 100644
--- a/tasks/behavior-store-honey-i00-standard/README.md
+++ b/tasks/behavior-store-honey-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-store-honey-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-store-honey-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-honey-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-store-honey-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-honey-i00-standard/environment/sim/server.py b/tasks/behavior-store-honey-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-store-honey-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-store-honey-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-store-honey-i00-standard/instruction.md b/tasks/behavior-store-honey-i00-standard/instruction.md
index 75d6ad7de5..edffc03347 100644
--- a/tasks/behavior-store-honey-i00-standard/instruction.md
+++ b/tasks/behavior-store-honey-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Put the jar of honey, which stands on the kitchen countertop, inside the cabinet in the entryway. Success means all of the following hold at the same time: (1) the jar of honey is inside the entryway cabinet. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-store-honey-i00-standard/tests/grade.py b/tasks/behavior-store-honey-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-store-honey-i00-standard/tests/grade.py
+++ b/tasks/behavior-store-honey-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-store-produce-i00-privileged/README.md b/tasks/behavior-store-produce-i00-privileged/README.md
index 497b29e7d8..5d4b1d0548 100644
--- a/tasks/behavior-store-produce-i00-privileged/README.md
+++ b/tasks/behavior-store-produce-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-store-produce-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-store-produce-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-produce-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-store-produce-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-produce-i00-privileged/instruction.md b/tasks/behavior-store-produce-i00-privileged/instruction.md
index 62e886562f..6f5782e2fe 100644
--- a/tasks/behavior-store-produce-i00-privileged/instruction.md
+++ b/tasks/behavior-store-produce-i00-privileged/instruction.md
@@ -60,7 +60,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -80,7 +80,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-store-produce-i00-privileged/tests/grade.py b/tasks/behavior-store-produce-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-store-produce-i00-privileged/tests/grade.py
+++ b/tasks/behavior-store-produce-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-store-produce-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-store-produce-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-produce-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-store-produce-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-produce-i00-standard/README.md b/tasks/behavior-store-produce-i00-standard/README.md
index 3740c7bddf..d1cb030add 100644
--- a/tasks/behavior-store-produce-i00-standard/README.md
+++ b/tasks/behavior-store-produce-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-store-produce-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-store-produce-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-store-produce-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-store-produce-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-store-produce-i00-standard/environment/sim/server.py b/tasks/behavior-store-produce-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-store-produce-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-store-produce-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-store-produce-i00-standard/instruction.md b/tasks/behavior-store-produce-i00-standard/instruction.md
index 352a43c4fa..2add128a34 100644
--- a/tasks/behavior-store-produce-i00-standard/instruction.md
+++ b/tasks/behavior-store-produce-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Store the produce. Two mangos and two pomegranates are in the wicker basket on the kitchen floor; put all four into one of the two kitchen refrigerators, all into the same one. Success means all of the following hold at the same time: (1) both pomegranates and both mangos are inside one and the same refrigerator. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-store-produce-i00-standard/tests/grade.py b/tasks/behavior-store-produce-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-store-produce-i00-standard/tests/grade.py
+++ b/tasks/behavior-store-produce-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-storing-food-i00-privileged/README.md b/tasks/behavior-storing-food-i00-privileged/README.md
index 09ad277543..7ca5407778 100644
--- a/tasks/behavior-storing-food-i00-privileged/README.md
+++ b/tasks/behavior-storing-food-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-storing-food-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-storing-food-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-storing-food-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-storing-food-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-storing-food-i00-privileged/instruction.md b/tasks/behavior-storing-food-i00-privileged/instruction.md
index dfc6ffcac7..3c8555eb24 100644
--- a/tasks/behavior-storing-food-i00-privileged/instruction.md
+++ b/tasks/behavior-storing-food-i00-privileged/instruction.md
@@ -75,7 +75,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -95,7 +95,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-storing-food-i00-privileged/tests/grade.py b/tasks/behavior-storing-food-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-storing-food-i00-privileged/tests/grade.py
+++ b/tasks/behavior-storing-food-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-storing-food-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-storing-food-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-storing-food-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-storing-food-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-storing-food-i00-standard/README.md b/tasks/behavior-storing-food-i00-standard/README.md
index 20bc62eafc..b5ab58394c 100644
--- a/tasks/behavior-storing-food-i00-standard/README.md
+++ b/tasks/behavior-storing-food-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-storing-food-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-storing-food-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-storing-food-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-storing-food-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-storing-food-i00-standard/environment/sim/server.py b/tasks/behavior-storing-food-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-storing-food-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-storing-food-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-storing-food-i00-standard/instruction.md b/tasks/behavior-storing-food-i00-standard/instruction.md
index 7b90e69574..4a28ffc935 100644
--- a/tasks/behavior-storing-food-i00-standard/instruction.md
+++ b/tasks/behavior-storing-food-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Store the food in the kitchen cabinets. Two boxes of oatmeal, two bags of chips, two bottles of olive oil and two jars of sugar stand on the kitchen countertop; put all eight inside kitchen cabinets (any cabinet, they need not all go into the same one). Success means all of the following hold at the same time: (1) every box of oatmeal, bag of chips, bottle of olive oil and jar of sugar is inside a kitchen cabinet. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-storing-food-i00-standard/tests/grade.py b/tasks/behavior-storing-food-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-storing-food-i00-standard/tests/grade.py
+++ b/tasks/behavior-storing-food-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-sweeping-garage-i00-privileged/README.md b/tasks/behavior-sweeping-garage-i00-privileged/README.md
index d2831ac61e..eeede86294 100644
--- a/tasks/behavior-sweeping-garage-i00-privileged/README.md
+++ b/tasks/behavior-sweeping-garage-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-sweeping-garage-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-sweeping-garage-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sweeping-garage-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-sweeping-garage-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sweeping-garage-i00-privileged/instruction.md b/tasks/behavior-sweeping-garage-i00-privileged/instruction.md
index 97be3b4cbe..7fd86b9f9d 100644
--- a/tasks/behavior-sweeping-garage-i00-privileged/instruction.md
+++ b/tasks/behavior-sweeping-garage-i00-privileged/instruction.md
@@ -54,7 +54,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -74,7 +74,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-sweeping-garage-i00-privileged/tests/grade.py b/tasks/behavior-sweeping-garage-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-sweeping-garage-i00-privileged/tests/grade.py
+++ b/tasks/behavior-sweeping-garage-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-sweeping-garage-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-sweeping-garage-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sweeping-garage-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-sweeping-garage-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sweeping-garage-i00-standard/README.md b/tasks/behavior-sweeping-garage-i00-standard/README.md
index b93e462f0b..1663b6b584 100644
--- a/tasks/behavior-sweeping-garage-i00-standard/README.md
+++ b/tasks/behavior-sweeping-garage-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-sweeping-garage-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-sweeping-garage-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-sweeping-garage-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-sweeping-garage-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-sweeping-garage-i00-standard/environment/sim/server.py b/tasks/behavior-sweeping-garage-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-sweeping-garage-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-sweeping-garage-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-sweeping-garage-i00-standard/instruction.md b/tasks/behavior-sweeping-garage-i00-standard/instruction.md
index 243b35620b..18182a0b81 100644
--- a/tasks/behavior-sweeping-garage-i00-standard/instruction.md
+++ b/tasks/behavior-sweeping-garage-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Sweep the garage. The garage floor is covered with sand and dust, and a broom and a bucket lie on it; remove all the sand and all the dust from the floor. Success means all of the following hold at the same time: (1) no sand is left on the garage floor; (2) no dust is left on the garage floor. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-sweeping-garage-i00-standard/tests/grade.py b/tasks/behavior-sweeping-garage-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-sweeping-garage-i00-standard/tests/grade.py
+++ b/tasks/behavior-sweeping-garage-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-thawing-frozen-food-i00-privileged/README.md b/tasks/behavior-thawing-frozen-food-i00-privileged/README.md
index 212d2e6477..3120c808c6 100644
--- a/tasks/behavior-thawing-frozen-food-i00-privileged/README.md
+++ b/tasks/behavior-thawing-frozen-food-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-thawing-frozen-food-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-thawing-frozen-food-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-thawing-frozen-food-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-thawing-frozen-food-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-thawing-frozen-food-i00-privileged/instruction.md b/tasks/behavior-thawing-frozen-food-i00-privileged/instruction.md
index e3dbd2c91a..23d74991e7 100644
--- a/tasks/behavior-thawing-frozen-food-i00-privileged/instruction.md
+++ b/tasks/behavior-thawing-frozen-food-i00-privileged/instruction.md
@@ -81,7 +81,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -101,7 +101,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-thawing-frozen-food-i00-privileged/tests/grade.py b/tasks/behavior-thawing-frozen-food-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-thawing-frozen-food-i00-privileged/tests/grade.py
+++ b/tasks/behavior-thawing-frozen-food-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-thawing-frozen-food-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-thawing-frozen-food-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-thawing-frozen-food-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-thawing-frozen-food-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-thawing-frozen-food-i00-standard/README.md b/tasks/behavior-thawing-frozen-food-i00-standard/README.md
index e34a9463e3..7fd6611ae0 100644
--- a/tasks/behavior-thawing-frozen-food-i00-standard/README.md
+++ b/tasks/behavior-thawing-frozen-food-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/server.py b/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-thawing-frozen-food-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-thawing-frozen-food-i00-standard/instruction.md b/tasks/behavior-thawing-frozen-food-i00-standard/instruction.md
index eb571682bc..3715f55545 100644
--- a/tasks/behavior-thawing-frozen-food-i00-standard/instruction.md
+++ b/tasks/behavior-thawing-frozen-food-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Thaw the frozen food. A frozen chicken breast and a frozen slice of bread lie on two plates inside the kitchen refrigerator. Put the chicken breast, on a plate, into the microwave oven, close the microwave and switch it on; put the bread slice, on a plate, on the countertop; close the refrigerator; neither food may still be frozen. Success means all of the following hold at the same time: (1) the chicken breast is not frozen and lies on top of a plate that is itself inside the microwave oven; (2) the microwave oven is switched on and closed; (3) the bread slice is not frozen and lies on top of a plate that is itself on top of the countertop; (4) the refrigerator is closed. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). open(A): at least one of A's openable joints (door, drawer, lid) is more than 5% of the way from closed to fully open; closed (not open) means every such joint is within 5% of closed. toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. frozen(A): A's current temperature is at or below its freezing temperature (0 °C by default). Objects drift back towards the 23 °C room temperature, so A stops being frozen once it has warmed above 0 °C. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-thawing-frozen-food-i00-standard/tests/grade.py b/tasks/behavior-thawing-frozen-food-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-thawing-frozen-food-i00-standard/tests/grade.py
+++ b/tasks/behavior-thawing-frozen-food-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-tidying-bathroom-i00-privileged/README.md b/tasks/behavior-tidying-bathroom-i00-privileged/README.md
index 56dc9b524d..3d616bfab5 100644
--- a/tasks/behavior-tidying-bathroom-i00-privileged/README.md
+++ b/tasks/behavior-tidying-bathroom-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-tidying-bathroom-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-tidying-bathroom-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-bathroom-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-tidying-bathroom-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-bathroom-i00-privileged/instruction.md b/tasks/behavior-tidying-bathroom-i00-privileged/instruction.md
index 37743aa343..d006feb74f 100644
--- a/tasks/behavior-tidying-bathroom-i00-privileged/instruction.md
+++ b/tasks/behavior-tidying-bathroom-i00-privileged/instruction.md
@@ -55,7 +55,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -75,7 +75,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-tidying-bathroom-i00-privileged/tests/grade.py b/tasks/behavior-tidying-bathroom-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-tidying-bathroom-i00-privileged/tests/grade.py
+++ b/tasks/behavior-tidying-bathroom-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-tidying-bathroom-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-tidying-bathroom-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-bathroom-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-tidying-bathroom-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-bathroom-i00-standard/README.md b/tasks/behavior-tidying-bathroom-i00-standard/README.md
index 2935cc7bac..72cebe2390 100644
--- a/tasks/behavior-tidying-bathroom-i00-standard/README.md
+++ b/tasks/behavior-tidying-bathroom-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/server.py b/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-tidying-bathroom-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-tidying-bathroom-i00-standard/instruction.md b/tasks/behavior-tidying-bathroom-i00-standard/instruction.md
index 96006902f5..65add04c9a 100644
--- a/tasks/behavior-tidying-bathroom-i00-standard/instruction.md
+++ b/tasks/behavior-tidying-bathroom-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Tidy the bathroom. The bar of soap, the soap dish and a cork lie on the sink; the tissue dispenser, a roll of toilet tissue and the wastebasket stand on the bathroom floor. Put the bar of soap on the soap dish, the tissue dispenser on the sink, the toilet tissue on the toilet, and the cork inside the wastebasket. Success means all of the following hold at the same time: (1) the bar of soap is on top of the soap dish; (2) the tissue dispenser is on top of the sink; (3) the toilet tissue is on top of the toilet; (4) the cork is inside the wastebasket. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-tidying-bathroom-i00-standard/tests/grade.py b/tasks/behavior-tidying-bathroom-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-tidying-bathroom-i00-standard/tests/grade.py
+++ b/tasks/behavior-tidying-bathroom-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-tidying-bedroom-i00-privileged/README.md b/tasks/behavior-tidying-bedroom-i00-privileged/README.md
index 7007177c8b..15ceb014bc 100644
--- a/tasks/behavior-tidying-bedroom-i00-privileged/README.md
+++ b/tasks/behavior-tidying-bedroom-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-tidying-bedroom-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-tidying-bedroom-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-bedroom-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-tidying-bedroom-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-bedroom-i00-privileged/instruction.md b/tasks/behavior-tidying-bedroom-i00-privileged/instruction.md
index 50773055bb..d3ef9dac29 100644
--- a/tasks/behavior-tidying-bedroom-i00-privileged/instruction.md
+++ b/tasks/behavior-tidying-bedroom-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-tidying-bedroom-i00-privileged/tests/grade.py b/tasks/behavior-tidying-bedroom-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-tidying-bedroom-i00-privileged/tests/grade.py
+++ b/tasks/behavior-tidying-bedroom-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-tidying-bedroom-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-tidying-bedroom-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-bedroom-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-tidying-bedroom-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-bedroom-i00-standard/README.md b/tasks/behavior-tidying-bedroom-i00-standard/README.md
index 45ec471ede..1ff19e5f27 100644
--- a/tasks/behavior-tidying-bedroom-i00-standard/README.md
+++ b/tasks/behavior-tidying-bedroom-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/server.py b/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-tidying-bedroom-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-tidying-bedroom-i00-standard/instruction.md b/tasks/behavior-tidying-bedroom-i00-standard/instruction.md
index 7901e41a9f..12f5b8bfcf 100644
--- a/tasks/behavior-tidying-bedroom-i00-standard/instruction.md
+++ b/tasks/behavior-tidying-bedroom-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Tidy the bedroom. The two sandals lie on the bedroom floor and the book lies on the bed. Put one sandal next to the bed and the other sandal next to the first one, and put the book on top of a table in the bedroom. Success means all of the following hold at the same time: (1) the first sandal is next to the bed; (2) the second sandal is next to the first sandal; (3) the book is on top of a table. How the simulator judges them: ontop(A, B): A touches B and B is directly below A (and not above it). nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-tidying-bedroom-i00-standard/tests/grade.py b/tasks/behavior-tidying-bedroom-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-tidying-bedroom-i00-standard/tests/grade.py
+++ b/tasks/behavior-tidying-bedroom-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-tidying-living-room-i00-privileged/README.md b/tasks/behavior-tidying-living-room-i00-privileged/README.md
index 8603696fea..7b218b66cc 100644
--- a/tasks/behavior-tidying-living-room-i00-privileged/README.md
+++ b/tasks/behavior-tidying-living-room-i00-privileged/README.md
@@ -46,3 +46,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-tidying-living-room-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-tidying-living-room-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-living-room-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-tidying-living-room-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-living-room-i00-privileged/instruction.md b/tasks/behavior-tidying-living-room-i00-privileged/instruction.md
index 04a5542a15..25844a3190 100644
--- a/tasks/behavior-tidying-living-room-i00-privileged/instruction.md
+++ b/tasks/behavior-tidying-living-room-i00-privileged/instruction.md
@@ -58,7 +58,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -78,7 +78,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-tidying-living-room-i00-privileged/tests/grade.py b/tasks/behavior-tidying-living-room-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-tidying-living-room-i00-privileged/tests/grade.py
+++ b/tasks/behavior-tidying-living-room-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-tidying-living-room-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-tidying-living-room-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-living-room-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-tidying-living-room-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-living-room-i00-standard/README.md b/tasks/behavior-tidying-living-room-i00-standard/README.md
index dc45fd4719..c71eb59dda 100644
--- a/tasks/behavior-tidying-living-room-i00-standard/README.md
+++ b/tasks/behavior-tidying-living-room-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-tidying-living-room-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-tidying-living-room-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-tidying-living-room-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-tidying-living-room-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-tidying-living-room-i00-standard/environment/sim/server.py b/tasks/behavior-tidying-living-room-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-tidying-living-room-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-tidying-living-room-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-tidying-living-room-i00-standard/instruction.md b/tasks/behavior-tidying-living-room-i00-standard/instruction.md
index 37182339ab..2ea96bdf3f 100644
--- a/tasks/behavior-tidying-living-room-i00-standard/instruction.md
+++ b/tasks/behavior-tidying-living-room-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Tidy the living room. Put the potted plant and the newspaper, which lie on the floor, on the coffee table; put the hardback book from the coffee table inside a bookcase; and put the notebook from the coffee table on the desk. Success means all of the following hold at the same time: (1) the potted plant is on top of the coffee table; (2) the newspaper is on top of the coffee table; (3) the hardback is inside a bookcase; (4) the notebook is on top of the desk. How the simulator judges them: inside(A, B): the centre of A's axis-aligned bounding box lies within B's bounding box and within B's interior (container) volume. ontop(A, B): A touches B and B is directly below A (and not above it). The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-tidying-living-room-i00-standard/tests/grade.py b/tasks/behavior-tidying-living-room-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-tidying-living-room-i00-standard/tests/grade.py
+++ b/tasks/behavior-tidying-living-room-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-turning-on-radio-i00-privileged/README.md b/tasks/behavior-turning-on-radio-i00-privileged/README.md
index aa3c2132ba..ba778b293b 100644
--- a/tasks/behavior-turning-on-radio-i00-privileged/README.md
+++ b/tasks/behavior-turning-on-radio-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle: the family is reviewed by a maintainer (PROTOCOL §2.7) in the pull r
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-turning-on-radio-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-turning-on-radio-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-turning-on-radio-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-turning-on-radio-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-turning-on-radio-i00-privileged/instruction.md b/tasks/behavior-turning-on-radio-i00-privileged/instruction.md
index c25f8e8e63..d0b6f6ff3e 100644
--- a/tasks/behavior-turning-on-radio-i00-privileged/instruction.md
+++ b/tasks/behavior-turning-on-radio-i00-privileged/instruction.md
@@ -48,7 +48,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -68,7 +68,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-turning-on-radio-i00-privileged/tests/grade.py b/tasks/behavior-turning-on-radio-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-turning-on-radio-i00-privileged/tests/grade.py
+++ b/tasks/behavior-turning-on-radio-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-turning-on-radio-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-turning-on-radio-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-turning-on-radio-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-turning-on-radio-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-turning-on-radio-i00-standard/README.md b/tasks/behavior-turning-on-radio-i00-standard/README.md
index 284cb31554..2b7034661e 100644
--- a/tasks/behavior-turning-on-radio-i00-standard/README.md
+++ b/tasks/behavior-turning-on-radio-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-turning-on-radio-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-turning-on-radio-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-turning-on-radio-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-turning-on-radio-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-turning-on-radio-i00-standard/environment/sim/server.py b/tasks/behavior-turning-on-radio-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-turning-on-radio-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-turning-on-radio-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-turning-on-radio-i00-standard/instruction.md b/tasks/behavior-turning-on-radio-i00-standard/instruction.md
index 81b73928a7..c0aabb081c 100644
--- a/tasks/behavior-turning-on-radio-i00-standard/instruction.md
+++ b/tasks/behavior-turning-on-radio-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Switch on the radio receiver that stands on the table in the living room. Success means all of the following hold at the same time: (1) the radio receiver is switched on. How the simulator judges them: toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-turning-on-radio-i00-standard/tests/grade.py b/tasks/behavior-turning-on-radio-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-turning-on-radio-i00-standard/tests/grade.py
+++ b/tasks/behavior-turning-on-radio-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/README.md b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/README.md
index 009c29b136..81734d9e37 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/README.md
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/instruction.md b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/instruction.md
index 2b8b822c4c..9a308a9799 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/instruction.md
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/instruction.md
@@ -60,7 +60,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -80,7 +80,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/grade.py b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/grade.py
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/README.md b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/README.md
index 5d8265e8ca..025878f312 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/README.md
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/server.py b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/instruction.md b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/instruction.md
index 18789d21b0..3aafa29626 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/instruction.md
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Turn out all the lights before sleep. Three light switches (in the kitchen, the utility room and the dining room) and two table lamps (one on the coffee table in the living room, one on the countertop in the utility room) are all switched on; switch every one of them off. Success means all of the following hold at the same time: (1) all three light switches are switched off; (2) both table lamps are switched off. How the simulator judges them: toggled_on(A): A's switch is on. It flips when a robot finger touches A's toggle button for 5 consecutive control steps; touch it again, after letting go, to flip it back. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/tests/grade.py b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/tests/grade.py
+++ b/tasks/behavior-turning-out-all-lights-before-sleep-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-unloading-the-car-i00-privileged/README.md b/tasks/behavior-unloading-the-car-i00-privileged/README.md
index 644648090e..a94130b976 100644
--- a/tasks/behavior-unloading-the-car-i00-privileged/README.md
+++ b/tasks/behavior-unloading-the-car-i00-privileged/README.md
@@ -44,3 +44,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-unloading-the-car-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-unloading-the-car-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-unloading-the-car-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-unloading-the-car-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-unloading-the-car-i00-privileged/instruction.md b/tasks/behavior-unloading-the-car-i00-privileged/instruction.md
index fde5af8b88..d3adfbe279 100644
--- a/tasks/behavior-unloading-the-car-i00-privileged/instruction.md
+++ b/tasks/behavior-unloading-the-car-i00-privileged/instruction.md
@@ -56,7 +56,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -76,7 +76,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-unloading-the-car-i00-privileged/tests/grade.py b/tasks/behavior-unloading-the-car-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-unloading-the-car-i00-privileged/tests/grade.py
+++ b/tasks/behavior-unloading-the-car-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-unloading-the-car-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-unloading-the-car-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-unloading-the-car-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-unloading-the-car-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-unloading-the-car-i00-standard/README.md b/tasks/behavior-unloading-the-car-i00-standard/README.md
index b1f97ce0c1..de24680b46 100644
--- a/tasks/behavior-unloading-the-car-i00-standard/README.md
+++ b/tasks/behavior-unloading-the-car-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-unloading-the-car-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-unloading-the-car-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-unloading-the-car-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-unloading-the-car-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-unloading-the-car-i00-standard/environment/sim/server.py b/tasks/behavior-unloading-the-car-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-unloading-the-car-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-unloading-the-car-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-unloading-the-car-i00-standard/instruction.md b/tasks/behavior-unloading-the-car-i00-standard/instruction.md
index de5a7df330..2e7d613449 100644
--- a/tasks/behavior-unloading-the-car-i00-standard/instruction.md
+++ b/tasks/behavior-unloading-the-car-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Unload the car. The briefcase and the satchel are inside the car in the garage; take both out and put them next to the sofa in the living room. Success means all of the following hold at the same time: (1) the briefcase is next to the sofa; (2) the satchel is next to the sofa. How the simulator judges them: nextto(A, B): the gap between A's and B's axis-aligned bounding boxes is at most one sixth of the mean of their summed box dimensions, and nothing lies between them along a horizontal axis. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-unloading-the-car-i00-standard/tests/grade.py b/tasks/behavior-unloading-the-car-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-unloading-the-car-i00-standard/tests/grade.py
+++ b/tasks/behavior-unloading-the-car-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-vacuuming-floors-i00-privileged/README.md b/tasks/behavior-vacuuming-floors-i00-privileged/README.md
index 6b7feef465..e3bc940cba 100644
--- a/tasks/behavior-vacuuming-floors-i00-privileged/README.md
+++ b/tasks/behavior-vacuuming-floors-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #71 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-vacuuming-floors-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-vacuuming-floors-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-vacuuming-floors-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-vacuuming-floors-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-vacuuming-floors-i00-privileged/instruction.md b/tasks/behavior-vacuuming-floors-i00-privileged/instruction.md
index 499d763749..b8c96c661f 100644
--- a/tasks/behavior-vacuuming-floors-i00-privileged/instruction.md
+++ b/tasks/behavior-vacuuming-floors-i00-privileged/instruction.md
@@ -50,7 +50,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -70,7 +70,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-vacuuming-floors-i00-privileged/tests/grade.py b/tasks/behavior-vacuuming-floors-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-vacuuming-floors-i00-privileged/tests/grade.py
+++ b/tasks/behavior-vacuuming-floors-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-vacuuming-floors-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-vacuuming-floors-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-vacuuming-floors-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-vacuuming-floors-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-vacuuming-floors-i00-standard/README.md b/tasks/behavior-vacuuming-floors-i00-standard/README.md
index 351475ec02..2e2e3bbe12 100644
--- a/tasks/behavior-vacuuming-floors-i00-standard/README.md
+++ b/tasks/behavior-vacuuming-floors-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/server.py b/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-vacuuming-floors-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-vacuuming-floors-i00-standard/instruction.md b/tasks/behavior-vacuuming-floors-i00-standard/instruction.md
index c7f267959f..d050bb4f5d 100644
--- a/tasks/behavior-vacuuming-floors-i00-standard/instruction.md
+++ b/tasks/behavior-vacuuming-floors-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** The bedroom floor is covered with dust and a vacuum cleaner stands on it; remove every bit of dust from the floor. Success means all of the following hold at the same time: (1) no dust is left on the bedroom floor. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-vacuuming-floors-i00-standard/tests/grade.py b/tasks/behavior-vacuuming-floors-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-vacuuming-floors-i00-standard/tests/grade.py
+++ b/tasks/behavior-vacuuming-floors-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-privileged/README.md b/tasks/behavior-wash-a-baseball-cap-i00-privileged/README.md
index 6f4a4c84f3..85659fe735 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-privileged/README.md
+++ b/tasks/behavior-wash-a-baseball-cap-i00-privileged/README.md
@@ -43,3 +43,4 @@ No oracle; human review in PR #75 (PROTOCOL §2.7), on the official human demons
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-wash-a-baseball-cap-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-wash-a-baseball-cap-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-privileged/instruction.md b/tasks/behavior-wash-a-baseball-cap-i00-privileged/instruction.md
index 635a064162..a4c9ff7b7d 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-privileged/instruction.md
+++ b/tasks/behavior-wash-a-baseball-cap-i00-privileged/instruction.md
@@ -53,7 +53,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -73,7 +73,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/grade.py b/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/grade.py
+++ b/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-wash-a-baseball-cap-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-standard/README.md b/tasks/behavior-wash-a-baseball-cap-i00-standard/README.md
index 741a075cd8..f572ef06fc 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-standard/README.md
+++ b/tasks/behavior-wash-a-baseball-cap-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/server.py b/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-wash-a-baseball-cap-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-standard/instruction.md b/tasks/behavior-wash-a-baseball-cap-i00-standard/instruction.md
index e4c2f7a4d9..3c491b65ef 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-standard/instruction.md
+++ b/tasks/behavior-wash-a-baseball-cap-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Wash the baseball caps. Two dirty baseball caps lie on the countertop in the utility room, where a washer stands; get both caps clean, so that no dirt is left on either of them. Success means all of the following hold at the same time: (1) neither baseball cap is covered with dirt. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-wash-a-baseball-cap-i00-standard/tests/grade.py b/tasks/behavior-wash-a-baseball-cap-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-wash-a-baseball-cap-i00-standard/tests/grade.py
+++ b/tasks/behavior-wash-a-baseball-cap-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/behavior-wash-dog-toys-i00-privileged/README.md b/tasks/behavior-wash-dog-toys-i00-privileged/README.md
index 2cc7517958..8cca556181 100644
--- a/tasks/behavior-wash-dog-toys-i00-privileged/README.md
+++ b/tasks/behavior-wash-dog-toys-i00-privileged/README.md
@@ -45,3 +45,4 @@ No oracle and no verified positive example: the family is reviewed by a maintain
### Change Log
- 2026-10-08: verifier time limits only. `tests/grade.py` gives each of the two fresh-process replays min(4 h, max(3600 s, 1200 s + steps / 2)) instead of a flat 3600 s, and `[verifier] timeout_sec` is 30600 s (was 5400 s), measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s, so long trajectories hit the old limit as a grader error. The scene, frozen instance and pass rule are unchanged, so the task keeps its name; a trial graded before this date with `grader_error` = 1 can be regraded.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the tooling Session's episode ends (`status()['fallen']`; `s.reset()` starts again), and the verifier's replays end at the same control step (`reward.json` `fallen`). The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; a trajectory in which the robot falls over and stays down for 10 s scores 0, and results recorded before this change are reported separately.
diff --git a/tasks/behavior-wash-dog-toys-i00-privileged/environment/rcb_behavior.py b/tasks/behavior-wash-dog-toys-i00-privileged/environment/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-wash-dog-toys-i00-privileged/environment/rcb_behavior.py
+++ b/tasks/behavior-wash-dog-toys-i00-privileged/environment/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-wash-dog-toys-i00-privileged/instruction.md b/tasks/behavior-wash-dog-toys-i00-privileged/instruction.md
index ce56e1674b..7de4abcd2f 100644
--- a/tasks/behavior-wash-dog-toys-i00-privileged/instruction.md
+++ b/tasks/behavior-wash-dog-toys-i00-privileged/instruction.md
@@ -66,7 +66,7 @@ s.render_grid(); s.start_video(path); s.stop_video(); s.state_sha(); s.episode_d
s.robot, s.env, s.get_object(name) # OmniGibson robot / environment / objects (with their object states) for closed-loop control
s.step(action) # one low-level action (25 floats, below) = one control step; s.hold_action() holds the targets
s.record_start(); ...; actions = s.record_stop() # (T, 25) actions, one row per control step (30 Hz)
-s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # resets, replays open-loop, returns status (the first replay in a process is exact)
s.save_trajectory(actions, "/app/output/trajectory.npz")
s.render_video(actions, "/app/output/check.mp4") # tiled robot cameras while replaying (with cameras="tiny": 16x16 tiles, upscaled)
@@ -86,7 +86,10 @@ The grader replays in two fresh processes; each is exactly this CLI (a fresh pro
position targets in the robot's own frame, re-applied every control step: a per-step displacement, 0 = stand still.
`s.hold_action()` (the last command with the base at 0) is the no-op.
- Control runs at 30 Hz with 120 Hz physics. Your wall-clock budget is 4 h (14400 s); there is no step budget. The
- episode ends by itself the moment the goal holds. While the robot moves, the cameras' frames lag the physics by 2
+ episode ends by itself the moment the goal holds. It also ends, as a failure, when the robot has fallen over: its base
+ tilted more than 41.4° from upright (the z of its up axis below 0.75), or more than 3 cm below the floor, for 10 s of
+ simulated time in a row (OmniGibson's own Falling rule; `s.status()["fallen"]`, `s.episode_done`). `s.reset()` starts
+ again; the grader's replays end at the same step. While the robot moves, the cameras' frames lag the physics by 2
control steps; `s.camera_info()` gives the pose they were rendered with.
- Primitives that take an `arm` ("left" / "right") default to the left one.
- Isaac Sim startup and scene loading take ~3 minutes per process and the simulator runs at ~7-11 steps/s: plan
diff --git a/tasks/behavior-wash-dog-toys-i00-privileged/tests/grade.py b/tasks/behavior-wash-dog-toys-i00-privileged/tests/grade.py
index 7a595b9762..41b941c4db 100644
--- a/tasks/behavior-wash-dog-toys-i00-privileged/tests/grade.py
+++ b/tasks/behavior-wash-dog-toys-i00-privileged/tests/grade.py
@@ -95,6 +95,8 @@ def main() -> int:
out = {"success": int(ok), "all_success": int(all_success), "deterministic": int(deterministic),
"instance_ok": int(instance_ok), "instance_exact": int(all(bool(r.get("instance_exact")) for r in runs)), "n_actions": int(len(acts)),
"sim_steps": int(outs[0].get("sim_steps") or 0),
+ # the robot fell over in a replay (the tooling's fall rule ended it there; the goal did not hold)
+ "fallen": int(any(bool(o.get("fallen")) for o in outs)),
# progress: the 2026 challenge's q_score of the last replay (before 2026-09-27 this read a key "progress"
# that the replay does not report, so final_reward was always 0)
"final_reward": float(outs[-1].get("q_score") or 0.0), "q_score": float(outs[-1].get("q_score") or 0.0),
diff --git a/tasks/behavior-wash-dog-toys-i00-privileged/tests/rcb_behavior.py b/tasks/behavior-wash-dog-toys-i00-privileged/tests/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-wash-dog-toys-i00-privileged/tests/rcb_behavior.py
+++ b/tasks/behavior-wash-dog-toys-i00-privileged/tests/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-wash-dog-toys-i00-standard/README.md b/tasks/behavior-wash-dog-toys-i00-standard/README.md
index 3f5477440d..60240c15f7 100644
--- a/tasks/behavior-wash-dog-toys-i00-standard/README.md
+++ b/tasks/behavior-wash-dog-toys-i00-standard/README.md
@@ -47,3 +47,4 @@ record in `/out`), which owns the scene and records the episode as a (T, 25) tra
### Change Log
- 2026-10-08: collect-hook time limit only. `[[verifier.collect]] timeout_sec` is 37800 s (was 21600 s): the episode end (up to 2 h through a resume) plus two replays of up to 4 h each (the privileged grader's cap of min(4 h, max(3600 s, 1200 s + steps / 2))) plus 30 min; measured on an 8-vCPU L40S host (job #3137): the Isaac start took 626 s and a 10,475-step replay ran slower than 3.5 control steps/s. The replays still have no limit of their own. The scene, frozen instance and pass rule are unchanged, so the task keeps its name.
+- 2026-10-09: a fall ends the episode as a failure (owner decision): once OmniGibson's own Falling rule (the base tilted more than 41.4° from upright, or more than 3 cm below the floor) has held for 10 s of simulated time, the service ends the episode with reason "failure: the robot fell over"; `/spec` `episode` states the end conditions and `reward.json` adds `task_failure`. The scene, frozen instance and BDDL goal are unchanged, so the task keeps its name; results recorded before this change are reported separately.
diff --git a/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/rcb_behavior.py b/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/rcb_behavior.py
index 87c4be200b..45fdd8dc37 100644
--- a/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/rcb_behavior.py
+++ b/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/rcb_behavior.py
@@ -18,6 +18,9 @@ trajectory : the (T, A) low-level robot actions handed to env.step, one row per
later ones drift, so the verifier replays in two fresh processes (the `replay` CLI).
budget : there is no step budget: the agent's wall clock is the limit. The challenge's timeout termination is lifted to
MAX_STEPS, which only stops runaway trajectories; the episode still ends the moment the BDDL goal holds.
+falls : the episode also ends, as a failure, when the robot has fallen over: OmniGibson's own Falling rule (its base
+ more than 3 cm below the floor, or its up axis tilted more than 41.4 degrees from vertical) holding for
+ FALL_HOLD_STEPS consecutive control steps (10 s of simulated time); status()["fallen"]. A replay ends there too.
CLI
---
@@ -41,7 +44,7 @@ Python (what the agent gets)
s.robot_spec(); s.robot_state() # joints with real limits, gripper rule, drive gains, TCP, mobile base; measured q/qd/effort, poses
s.kinematics({"op": "fk", "q": q}) # stateless FK / IK in the robot base frame (s.kinematics_spec()); the standard mode's /kinematics
s.record_start(); ...; actions = s.record_stop() # (T, 25) low-level actions, one row per env step
- s.status() # {'success': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
+ s.status() # {'success': bool, 'fallen': bool, 'q_score': float, 'sim_steps': int, 'resets': int, 'state_sha': str}
s.replay(actions) # the first replay in a process is exact; the CLI `replay` (fresh process) is the grader's view
s.save_trajectory(actions, "/app/output/trajectory.npz")
"""
@@ -73,6 +76,45 @@ import numpy as np
SESSION_LOG = os.environ.get("RCB_SESSION_LOG", "/app/output/rcb_session_log.jsonl")
SESSION_LOG_KEEP = os.environ.get("RCB_SESSION_LOG_KEEP", "/logs/agent/rcb_session_log.jsonl")
MAX_STEPS = 200_000 # no step budget (the wall clock is); this only stops a runaway trajectory (~1.9 h of sim time)
+# The robot has fallen over: OmniGibson 3.9.2's Falling termination condition (omnigibson/termination_conditions/falling.py,
+# used by its navigation tasks; BehaviorTask has only Timeout and PredicateGoal) with its defaults, on the pose it reads
+# (robot.get_position_orientation(): the R1Pro's base_link), held for FALL_HOLD_STEPS consecutive control steps so that a
+# short topple that is over within the hold never counts (the longest in the recorded standard-mode runs: 4.3 s).
+FALL_HEIGHT_M = 0.03 # the base more than this below the floor (the scene's floor height: 0 in BEHAVIOR's houses)
+FALL_TILT_TOLERANCE = 0.75 # the z of the base's up axis below this: tilted more than 41.4 degrees
+FALL_HOLD_STEPS = 300 # 10 s at the 30 Hz control rate (simulated time: a fresh-process replay ends at the same step)
+FALL_REASON = "failure: the robot fell over"
+
+
+def up_z(quat_xyzw) -> float:
+ """z of a body's up axis for an XYZW quaternion (R[2][2]). On the R1Pro it is also cos(rx) * cos(ry) of the virtual
+ base joints base_footprint_rx_joint / _ry_joint: the base hangs from an upright world-fixed root."""
+ qx, qy, qz, qw = (float(v) for v in quat_xyzw)
+ n = qx * qx + qy * qy + qz * qz + qw * qw
+ return 1.0 - 2.0 * (qx * qx + qy * qy) / n if n > 0.0 else float("nan")
+
+
+class FallWatch:
+ """OmniGibson's Falling condition, held for `hold` consecutive control steps; update() once per control step.
+ `fallen` latches until reset(), as the episode's end does. NaN never counts (as upstream: NaN < x is False)."""
+
+ def __init__(self, hold: int = FALL_HOLD_STEPS, floor_z: float = 0.0):
+ self.hold, self.floor_z = int(hold), float(floor_z)
+ self.reset()
+
+ def reset(self) -> None:
+ self.run, self.fallen, self.fallen_step, self.steps = 0, False, None, 0
+
+ @staticmethod
+ def falling(base_z: float, up_z_: float, floor_z: float = 0.0) -> bool:
+ return bool(base_z < floor_z - FALL_HEIGHT_M or up_z_ < FALL_TILT_TOLERANCE)
+
+ def update(self, base_z: float, up_z_: float) -> bool:
+ self.steps += 1
+ self.run = self.run + 1 if self.falling(base_z, up_z_, self.floor_z) else 0
+ if not self.fallen and self.run >= self.hold:
+ self.fallen, self.fallen_step = True, self.steps
+ return self.fallen
def _slog(ev: str, **kw) -> None:
@@ -1143,6 +1185,12 @@ class Session:
if strict:
raise RuntimeError(msg)
_log("WARNING:", msg)
+ try:
+ floor_z = float(self.env.scene.get_floor_height())
+ except Exception: # noqa: BLE001
+ floor_z = 0.0
+ self._fall = FallWatch(FALL_HOLD_STEPS, floor_z) # the fall rule (FALL_*); its end is self.end_reason
+ self.end_reason: str | None = None
_log(f"instance {self.instance_id} loaded; state_sha={self.instance_sha}; max_steps={self.max_steps}")
def _poses_match(self, inst: dict, pos_tol: float = 2e-3, quat_tol: float = 2e-2) -> bool:
@@ -1198,6 +1246,8 @@ class Session:
self.episode_done = False
self._last_action = None
self._stepped = False
+ self._fall.reset()
+ self.end_reason = None
self._policy.reset()
self.ev.reset()
self._lift_timeout()
@@ -1209,17 +1259,28 @@ class Session:
if a.numel() != self.action_dim:
raise ValueError(f"action must have {self.action_dim} entries, got {a.numel()}")
if self.episode_done:
- raise PrimitiveError("episode is over (success or timeout); call reset() before stepping again")
+ raise PrimitiveError(f"episode is over ({self.end_reason or 'success or timeout'}); call reset() before stepping again")
if self._recording is not None:
self._recording.append(a.clone())
self._stepped = True
self._last_action = a.clone()
self._policy.next = a
terminated, truncated = self.ev.step()
+ if not (terminated or truncated) and self._fall_step(): # the BDDL goal first: a success on the same step stands
+ terminated = True
if terminated or truncated:
self.episode_done = True
return terminated, truncated
+ def _fall_step(self) -> bool:
+ """The fall rule for the control step just taken; True on the step its hold is reached (the episode ends there)."""
+ pos, quat = self.robot.get_position_orientation()
+ if self._fall.update(float(pos[2]), up_z(quat.tolist())) and self.end_reason is None:
+ self.end_reason = FALL_REASON
+ _slog("fallen", task=self.task, sim_steps=int(self.env.episode_steps), hold_steps=FALL_HOLD_STEPS)
+ return True
+ return False
+
def _gripper_cmd(self, arm: str, open_: bool):
"""The action entries of `arm`'s gripper: open = both fingers 2 cm beyond their upper limit (assisted grasping only
releases on a command at or above the limit), closed = their lower limit (it holds whatever the fingers touch)."""
@@ -1246,8 +1307,8 @@ class Session:
return a
def status(self) -> dict[str, Any]:
- out = {"success": bool(self.env.task.success), "sim_steps": int(self.env.episode_steps), "resets": self._resets,
- "state_sha": self.state_sha(), "q_score": None}
+ out = {"success": bool(self.env.task.success), "fallen": bool(self._fall.fallen), "sim_steps": int(self.env.episode_steps),
+ "resets": self._resets, "state_sha": self.state_sha(), "q_score": None}
try:
for m in self.ev.metrics:
agg = m.aggregate(self.env)
diff --git a/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/server.py b/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/server.py
index c43a85c894..863da3046c 100644
--- a/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/server.py
+++ b/tasks/behavior-wash-dog-toys-i00-standard/environment/sim/server.py
@@ -17,6 +17,9 @@ Differences from the RoboTwin service, all from the simulator:
simulator in this container would not fit next to the live one. So when the episode ends the service writes
/out/trajectory.npz + /out/episode.json (live result and state hash); the collect hook's SIGUSR1 makes it exit, and
environment/sim/finalize.sh replays the trajectory in two fresh processes and completes /out/final.json;
+- the episode ends when the BDDL goal holds (success), when the robot has fallen over (the tooling's fall rule,
+ OmniGibson's Falling held for 10 s of simulated time: reason "failure: the robot fell over"), on the collect hook's
+ signal (timeout) or on a simulator error; /spec "episode" says so;
- crash recovery (rcb_limited.Episode, docs/STANDARD_MODE_2_2.md §13): every executed control step goes to
/out/journal.f64, every completed call is checkpointed (rows, state hash, proprio row); after a crash compose restarts
the container (run.sh exits non-zero) and this service replays the journal and continues the SAME episode. Resume
@@ -175,6 +178,11 @@ SPEC = {
"moves; its extrinsic_cv is the camera pose it was rendered with, so pixels, depth and pose agree; proprio "
"is the state at frame_step"},
"budget": {"reset": 0, "steps": None, "wall_clock_s": float(os.environ.get("RCB_WALL_CLOCK_S", "14400"))},
+ "episode": ("one episode, no reset: it ends the moment the task's goal holds (success); when the robot has fallen over, i.e. its "
+ f"base has been tilted more than {math.degrees(math.acos(M.FALL_TILT_TOLERANCE)):.1f} degrees from upright (the z of its up "
+ f"axis below {M.FALL_TILT_TOLERANCE}: cos(rx) * cos(ry) of base_footprint_rx_joint / _ry_joint) or more than "
+ f"{M.FALL_HEIGHT_M:g} m below the floor for {M.FALL_HOLD_STEPS / CTRL_HZ:g} s of simulated time in a row "
+ f"({M.FALL_HOLD_STEPS} control steps; reason \"{M.FALL_REASON}\"); when your time is up (timeout); or on a simulator error (error)"),
"robot_spec": RSPEC,
"kinematics": KSPEC,
"depth": {"modes": list(L.DEPTH_MODES), "default": "none", "kind": "z-depth", "unit": "m", "invalid": 0, "max_m": L.DEPTH_MAX_M,
@@ -244,7 +252,7 @@ def ctrl_step(a: np.ndarray, rec: L.Recorder) -> bool:
"""One recorded and journaled control step. True when the call must stop: the episode is over (the BDDL goal holding
also terminates it), or the layer stops the call (max_call_wall_s, the client hung up)."""
term, trunc = S.step(a); stop = EP.journal(a); rec.tick()
- if term or trunc: finish("success" if check_success() else "step_guard")
+ if term or trunc: finish("success" if check_success() else (S.end_reason or "step_guard"))
return E["done"] or stop
diff --git a/tasks/behavior-wash-dog-toys-i00-standard/instruction.md b/tasks/behavior-wash-dog-toys-i00-standard/instruction.md
index 78a8097fc6..53df53ea43 100644
--- a/tasks/behavior-wash-dog-toys-i00-standard/instruction.md
+++ b/tasks/behavior-wash-dog-toys-i00-standard/instruction.md
@@ -5,8 +5,12 @@ v3.9.2, the 2026 BEHAVIOR Challenge stack) runs in a service you cannot open. Yo
**Task:** Wash the dog toys. Two teddy bears, a tennis ball and a softball are inside the cabinet in the utility room: one teddy is dirty and the other dusty, the tennis ball is covered with debris and the softball with dirt. Clean all four; a washing machine stands in the utility room. Success means all of the following hold at the same time: (1) neither teddy bear has any dirt or dust on it; (2) the tennis ball has no debris on it; (3) the softball has no dirt on it. How the simulator judges them: covered(A, S): at least one particle of the substance S (e.g. dust) is on A; A is clean of S (not covered) only when every particle of S has been removed from it. The service checks the goal and the episode ends the moment it holds.
## Rules (real-robot rules)
-- **No reset.** The episode starts when the service comes up and ends on success, when your time is up, or on a
- simulator error. Whatever you knock over or push away stays where it ends up.
+- **No reset.** The episode starts when the service comes up and ends on success, when the robot has fallen over, when
+ your time is up, or on a simulator error. Whatever you knock over or push away stays where it ends up.
+- **A fall ends the episode as a failure** (`meta["reason"]` "failure: the robot fell over"): the robot has fallen over
+ when its base has been tilted more than 41.4° from upright, or more than 3 cm below the floor, for 10 s of simulated
+ time in a row (OmniGibson's own Falling rule; tilted means the z of the base's up axis is below 0.75, which the
+ proprioception gives as cos(rx)·cos(ry) of `base_footprint_rx_joint` and `base_footprint_ry_joint`).
- **No privileged state.** You see what the robot's cameras see (RGB; depth on request) plus its own proprioception
(joints, base pose, end-effector and fingertip poses, gripper openings). No object poses, no map, no success predicate.
- Steps are unlimited; your wall-clock budget is 4 h (14400 s; `meta["time_left_s"]`). Actions and simulated time
diff --git a/tasks/behavior-wash-dog-toys-i00-standard/tests/grade.py b/tasks/behavior-wash-dog-toys-i00-standard/tests/grade.py
index 1b193ecf6a..68fa0f2de3 100644
--- a/tasks/behavior-wash-dog-toys-i00-standard/tests/grade.py
+++ b/tasks/behavior-wash-dog-toys-i00-standard/tests/grade.py
@@ -20,6 +20,8 @@ write(ok, {"success": int(ok), "live_success": int(bool(d.get("success"))), "rep
"finalized": int(bool(d.get("finalized"))), "n_actions": int(d.get("n_actions") or 0), "sim_steps": int(d.get("control_steps") or 0),
"physics_steps": int(d.get("physics_steps") or 0), "steps": int(d.get("steps") or 0), "elapsed_s": num("elapsed_s"),
"video_rendered": int(bool(d.get("video"))), "gpu_lost": int(bool(d.get("gpu_lost"))),
+ # the episode ended by the task's failure rule: the robot fell over (reason "failure: the robot fell over")
+ "task_failure": int(str(d.get("reason") or "").startswith("failure")),
"q_score": num("q_score"), # progress (the challenge's q_score of the replays), 2026-09-27
# crash recovery (eai-standard/2.2): service starts, resumes, whether a resumed state differed and by how much,
# and a give-up after too many crashes
diff --git a/tasks/dataset.toml b/tasks/dataset.toml
index 01440ed093..0046cbfbce 100644
--- a/tasks/dataset.toml
+++ b/tasks/dataset.toml
@@ -11,91 +11,91 @@ keywords = [ "robotics", "manipulation", "humanoid", "code-as-policy", "harbor",
[[tasks]]
name = "robot-coding-bench/behavior-clean-up-broken-glass-i00-privileged"
-digest = "sha256:35938ff2affb4757fce475ec418f8af4a7c89ebb66ea9e9a5f917a3b414d2d32"
+digest = "sha256:d14eb8647ede73a6eeff82254b1a85dddbb878a2d0ed126a59fdfa8a617d910f"
[[tasks]]
name = "robot-coding-bench/behavior-clean-up-broken-glass-i00-standard"
-digest = "sha256:e3936e36b11a3ddc5caf14bb42e6aba402812fc6c1750481dbd2290773a96679"
+digest = "sha256:17e6a1f1f1001df3cdaf77fac735d7c2adc1a656fb6ea6e796b577bde5e3bbec"
[[tasks]]
name = "robot-coding-bench/behavior-collecting-aluminum-cans-i00-privileged"
-digest = "sha256:3e375e0253e7fd554a5917f71d9f1d3fa8f5808727675e71038a82cf1ece72d4"
+digest = "sha256:29f28f03d5e0b571eed9f9f2a91089dd463a46ca51a1ef9792366720be3ff98b"
[[tasks]]
name = "robot-coding-bench/behavior-collecting-aluminum-cans-i00-standard"
-digest = "sha256:9d277b4a0f8eb3cd2951e924fa04a897741e09fbaf65c0cb82fa117d2273273d"
+digest = "sha256:3b9070dbc779315ab044a17aea9b024bcd7282227e70c319a72880c07bb12a0a"
[[tasks]]
name = "robot-coding-bench/behavior-composting-waste-i00-privileged"
-digest = "sha256:80deb86f185fa98ad1ba277b0fefa83807be378b19d406cd25705daae1266647"
+digest = "sha256:70571357978f64d1f42f6681335001c0c600c5b4c25ec98c82b43beb34766168"
[[tasks]]
name = "robot-coding-bench/behavior-composting-waste-i00-standard"
-digest = "sha256:196c141987803b3612fc3439676105bad5310f40040270305634e073e3213c07"
+digest = "sha256:feb8e1da4678c37a7510c92d0880842157d69bc25ccd88b2060d6ab14ae24d53"
[[tasks]]
name = "robot-coding-bench/behavior-dispose-of-glass-i00-privileged"
-digest = "sha256:0ee1ae448826b563c6ff9242cbf8a9252d92ab457513da713590c592e5a284fe"
+digest = "sha256:3c44b9d0cb934d5d9ee702cbf54798f22a1330fbb0e2a03c86af842e023ab32f"
[[tasks]]
name = "robot-coding-bench/behavior-dispose-of-glass-i00-standard"
-digest = "sha256:e47db4379b2eeac959699b9e5d005c9ce5e03258b6f5df97ab0b7cf7f2d5efaf"
+digest = "sha256:2e4db0b6f23c682b307ac4a213d5e26f4b50ac96014f7d5587bbb327cb55434d"
[[tasks]]
name = "robot-coding-bench/behavior-hiding-Easter-eggs-i00-privileged"
-digest = "sha256:711b7ca63fa97bae47eef7a87733d0e9c1f6fecdfadb7f085fce4136b453851e"
+digest = "sha256:d313eb22007e39e319a150b870394239d7cfa971d4442c0df0702a65b2b89fcc"
[[tasks]]
name = "robot-coding-bench/behavior-hiding-Easter-eggs-i00-standard"
-digest = "sha256:5b7bd769caf40ef25578633fc0fa7a60d1d3e4360826d9bad47321e65348317b"
+digest = "sha256:b6957d6652d594f413416d7a8b11b6507b081b13ec1334a6989b78ff2d100906"
[[tasks]]
name = "robot-coding-bench/behavior-installing-a-scanner-i00-privileged"
-digest = "sha256:a67111ab8c9d5ef22d1919c7d48fa8e7d7556481ae95042ad595c5b400d6f63c"
+digest = "sha256:19299a400d1893cc20f3a4066eab8ae1694029fc7eb8db2c05c08642cb86c9f0"
[[tasks]]
name = "robot-coding-bench/behavior-installing-a-scanner-i00-standard"
-digest = "sha256:e853d14694a00494d15e10c0173e9d041d4ff562cbd057c77f722226aa65ee8d"
+digest = "sha256:0226e18f9506ce0e9d7f557952a715b71c12f0d7f1f5524b3749336a265bbd60"
[[tasks]]
name = "robot-coding-bench/behavior-picking-up-trash-i00-privileged"
-digest = "sha256:7ac59797dd6a8764d3d2a8c23ddbe88ddcf5707cece97ea8a4298d3cad1dcd3d"
+digest = "sha256:f64b2573384a6ad4caad533b67bb8ef77a0eb64d8b83fa1c66a313cbe41236c6"
[[tasks]]
name = "robot-coding-bench/behavior-picking-up-trash-i00-standard"
-digest = "sha256:9da02592bd2f87ecb3b63afafed99b4fa528b9948c9ba76e779e392b45126639"
+digest = "sha256:a996b7f383e333e6a2279e234219c912ed5275a55f6052b289f200c6bfd1a790"
[[tasks]]
name = "robot-coding-bench/behavior-putting-shoes-on-rack-i00-privileged"
-digest = "sha256:7e1980cf3c66c16b7dd4a080382e54a4320d7a3a9bc83ce827c1cdf945747d68"
+digest = "sha256:4200785d42a95637cb2abb5317452b157b3effd25d32cfd19555517e22cd7707"
[[tasks]]
name = "robot-coding-bench/behavior-putting-shoes-on-rack-i00-standard"
-digest = "sha256:06c1c935cb2aeae841ea3c3b3258be7c517db06b217c36f9eab49c44546234dd"
+digest = "sha256:852fc428c4734c07efca5ceaa00e4d4b6be7313cdeb89e045d58eea5d0f5fdb4"
[[tasks]]
name = "robot-coding-bench/behavior-stacking-wood-i00-privileged"
-digest = "sha256:e780f5a86192b975bb085f7ab31d15ce82826155d4e0b8911c91dec881108137"
+digest = "sha256:9ac88a61be7dc55023c08b175f397d40162d36962694a5bcf73f16dfef75a7e0"
[[tasks]]
name = "robot-coding-bench/behavior-stacking-wood-i00-standard"
-digest = "sha256:b1bf313df6048f1db223e3757168d0025763a0d42f1600614b0762223907a3b3"
+digest = "sha256:f733d7530848012ddb4da387a9c3df10b4d60d93cc52d56dc086dd38c44d3b24"
[[tasks]]
name = "robot-coding-bench/behavior-tidying-bedroom-i00-privileged"
-digest = "sha256:02b34a6777591691c907a5ce077bbe46a7dad775adc7ecb29aa7f7a923f10728"
+digest = "sha256:15e62dfbb3ef1a902ab45df6119fbd29fb0dae5dd2f0b163d50ee9311863d1a0"
[[tasks]]
name = "robot-coding-bench/behavior-tidying-bedroom-i00-standard"
-digest = "sha256:eb1cb3136117338d5bef3b9c2806045c6099f60c27dfdaff099d59d14f10e0d6"
+digest = "sha256:6fc97560bf3d8c8a4efa0050e88895ee205ebc258883c57e3fb11a8da572a8a9"
[[tasks]]
name = "robot-coding-bench/behavior-turning-on-radio-i00-privileged"
-digest = "sha256:51e6e438de93731d4c071c799ea9041d20a912099631de09bf3acadc57698b17"
+digest = "sha256:16ab6f721654a147cf665cee9d8d22ba8a011144bbb0c35ad0fd58ad4a330bfe"
[[tasks]]
name = "robot-coding-bench/behavior-turning-on-radio-i00-standard"
-digest = "sha256:fe6d3a05bcc0f1dec1887c035dd14c4936ff535e068dfebe33f1407b5b9e0804"
+digest = "sha256:92056e926364fbd6bc79a85769cf5f44b07e8709463a5195f2f98caf0c780c3f"
[[tasks]]
name = "robot-coding-bench/dextoolbench_brush_blue_brush_sweep_forward-privileged"
@@ -3211,403 +3211,403 @@ digest = "sha256:a3b6b9ddedf9ceb86626c113816523c3454b486c106c41d18b504a9a41d6be3
[[tasks]]
name = "robot-coding-bench/behavior-bringing-paper-to-recycling-i00-privileged"
-digest = "sha256:7218cbf9f0545488fdb52e645b2bcb654faac208cc5c00199c99f7f4038d43e6"
+digest = "sha256:9970faed6f36f6da0717d048ac13acc13a201e7903597af45fc5f7c9c8392a02"
[[tasks]]
name = "robot-coding-bench/behavior-bringing-paper-to-recycling-i00-standard"
-digest = "sha256:0b6af56f4102ef4836b6810097100bcfd4d58a122d249b045d95a6375a2ccf04"
+digest = "sha256:aa702bc1c28fb253eafdca2620060a9f04b8ee91f307443643029242c34a4437"
[[tasks]]
name = "robot-coding-bench/behavior-can-meat-i00-privileged"
-digest = "sha256:0ae955217e4db3446618ac130f589a7b3e8d4e66d936f0c501143428ab3878f3"
+digest = "sha256:3e10e147eb615378b40f42928debd03937dae42c779e32979e40771e7b834094"
[[tasks]]
name = "robot-coding-bench/behavior-can-meat-i00-standard"
-digest = "sha256:4eeb46a1e297498dc488d479b344b185856c887f8bd2a5840283d64e0a74fb04"
+digest = "sha256:c3953ee4276ab0066ae2b2c8e261869383aec4a099cba0b92245c959d99759c0"
[[tasks]]
name = "robot-coding-bench/behavior-carrying-in-groceries-i00-privileged"
-digest = "sha256:1556a20e66af12dcd56f325194ea9a72a1e2c94e3f641c88fb87222368e0c760"
+digest = "sha256:273bbf7d3a2c2d931f49809063e62aa3ce2b3e848bd7c41f310e88ac52564d26"
[[tasks]]
name = "robot-coding-bench/behavior-carrying-in-groceries-i00-standard"
-digest = "sha256:bbeba7b3e0774fe71bbce5d9fece8297e73177e9191b92a46e3989ff12faa0f6"
+digest = "sha256:af67a41bf3e547dde8baea48da7d1a93c01345748dfb794fe6c6b6f47f0d82d0"
[[tasks]]
name = "robot-coding-bench/behavior-carrying-out-garden-furniture-i00-privileged"
-digest = "sha256:199e25677ee0226cfed4e6fadf44eb2b255766af700913bd52466b07a77158b2"
+digest = "sha256:9c85d86c485ddf25c07cc466b0390191ab8ead56b77a0f8ea2e1a7f36c97d8b9"
[[tasks]]
name = "robot-coding-bench/behavior-carrying-out-garden-furniture-i00-standard"
-digest = "sha256:7d85676494b835be2d16148c969e7a4e99e29a5b74fb520df5b69fed8e6992b5"
+digest = "sha256:c10268f0f7129492df5d6a04d168a32a9d9ef44444f591b7d8455d67250aacca"
[[tasks]]
name = "robot-coding-bench/behavior-cleaning-up-branches-and-twigs-i00-privileged"
-digest = "sha256:fbc3e9a20debb63d22fdda2cf9679dee67264550c211a11261d11682698595b2"
+digest = "sha256:0ec5e038c234bb4151a95dc540390db333eb0cd9917e15f887a320e799ad4d31"
[[tasks]]
name = "robot-coding-bench/behavior-cleaning-up-branches-and-twigs-i00-standard"
-digest = "sha256:a765f518cc1c672b7e6447685c1f9b4e9d3c25c3575715eaaae497dd2ca170d0"
+digest = "sha256:e203d306be8d7dde21b48acd850b805c417d96cf76a22f5033696fe8f7edb146"
[[tasks]]
name = "robot-coding-bench/behavior-clearing-food-from-table-into-fridge-i00-privileged"
-digest = "sha256:8a0e6583eb9999653b734a5ec11ff40a006495403f9e3f998d29985d955c1833"
+digest = "sha256:03754b895c1fb47a85f28db26b203185ab43d6f37fd0016fcc41f44655fa31ff"
[[tasks]]
name = "robot-coding-bench/behavior-clearing-food-from-table-into-fridge-i00-standard"
-digest = "sha256:12237016c5a7ce796788a42e876e0424b82698906ec52dd656f301ae7c760caf"
+digest = "sha256:5ed5aaf345c683866c3101d8fd76b7c62b94dd96fcd9bfbeabf1447180027d0b"
[[tasks]]
name = "robot-coding-bench/behavior-dispose-of-batteries-i00-privileged"
-digest = "sha256:2956f440440fc14244bfaf00d9b0724b05b4cd8ef6253117df7dcf1e7941e867"
+digest = "sha256:3eb6f085f6934738896b5f7d9d91429c150bd60458c1ff6e42a19d1b4ed51d55"
[[tasks]]
name = "robot-coding-bench/behavior-dispose-of-batteries-i00-standard"
-digest = "sha256:c9f458d554419067c45341eedc5bcc6fb040a31d28ef637558b700b88630b8ba"
+digest = "sha256:f4c1c0808088e0c5c631c4816667921ab227181e69d818e655e146a1f2534ab6"
[[tasks]]
name = "robot-coding-bench/behavior-laying-tile-floors-i00-privileged"
-digest = "sha256:72005c34a2343e89ff73ee5fa1018ef36cd240e434b41ab750c11160f3877ff4"
+digest = "sha256:3c251cfc61d42fcfc6642a506d770991023e3f0643a680bb729faab085e0ef59"
[[tasks]]
name = "robot-coding-bench/behavior-laying-tile-floors-i00-standard"
-digest = "sha256:7714f6fd5d4bcd315c91f79dc8b4bc747e0f03089c0ac21b65df4bfdf1b13bc4"
+digest = "sha256:04c6eeff9177d939b1db730690b945262fa9ed37aa2facb333122c50564e7db1"
[[tasks]]
name = "robot-coding-bench/behavior-outfit-a-basic-toolbox-i00-privileged"
-digest = "sha256:185f5ee30af580776caf7a0582b9b449d15981e8ebc8d26a41fcb4efa82f6956"
+digest = "sha256:f2dc03cfab4c3633a35ca499f4e908dcea6d01ebf7646452f8dd97c2cf33ea25"
[[tasks]]
name = "robot-coding-bench/behavior-outfit-a-basic-toolbox-i00-standard"
-digest = "sha256:191631377b609a2f45693dbdb5f8aff83aeba106dc0405752955f32322f20557"
+digest = "sha256:8b956cc666f35461a396c6bd63f9210f7f708228b13ee461d089a580d97a853b"
[[tasks]]
name = "robot-coding-bench/behavior-put-together-a-basic-pruning-kit-i00-privileged"
-digest = "sha256:607b956ea99e4882f97a7369b36e3fdca28497f033047945c156e7d054dd2abe"
+digest = "sha256:546bcaa65a3886c8c89766db254987b346311e2b0526eccce922e96c1ccba735"
[[tasks]]
name = "robot-coding-bench/behavior-put-together-a-basic-pruning-kit-i00-standard"
-digest = "sha256:abf53033f8b21bdf424add71c325416f28b4ada1ec1e8d0e7fbbd6cedb51c68d"
+digest = "sha256:dce341842503534e88acd30d393d7464440487d6a0029c3f687cb497b580c3a0"
[[tasks]]
name = "robot-coding-bench/behavior-putting-dirty-dishes-in-sink-i00-privileged"
-digest = "sha256:326971e370afcf02819d17ff4d8b693dd233c1d94df365889759f6d959e58480"
+digest = "sha256:e229b20485673a13236072ef5c9bab5856f1e05f99a7b37c7b20fceb237d2b76"
[[tasks]]
name = "robot-coding-bench/behavior-putting-dirty-dishes-in-sink-i00-standard"
-digest = "sha256:cd7d3e3af42d2c73e72adcb36e3fbb51df8bee6cca96d92f3902cf06dbe1115e"
+digest = "sha256:4d5784b0e3fe042f2dc006f7270ddd33d4fa74a31bf47f8c9061d96a9f74ed65"
[[tasks]]
name = "robot-coding-bench/behavior-putting-dishes-away-after-cleaning-i00-privileged"
-digest = "sha256:6a68a096568f9c8acf2a3758c86cc173ccc46f1b64a51edd347318d9dbee20d0"
+digest = "sha256:5085efd3539920a67715afe4acaa7a452befaa97bbc09a05da04a088674d6a95"
[[tasks]]
name = "robot-coding-bench/behavior-putting-dishes-away-after-cleaning-i00-standard"
-digest = "sha256:30ca3b6c5df4121380c7ba6503b92ec01f575ecad1e0aa732f89b9f5ef3cc68c"
+digest = "sha256:d866bb1c6455959beaf55cfa83ba58ffe788f39758e329cd102d2a0492cb8320"
[[tasks]]
name = "robot-coding-bench/behavior-putting-up-Christmas-decorations-inside-i00-privileged"
-digest = "sha256:2e7986d3cc892f5cfd8858ed56e079a1ee9f36da5c414fcb5a68c2bf1394c7e6"
+digest = "sha256:89672788727b94eac47d01fadb105152bdbafcb6f1b293d0e2ff2f845d8c512d"
[[tasks]]
name = "robot-coding-bench/behavior-putting-up-Christmas-decorations-inside-i00-standard"
-digest = "sha256:1d30bab705bd146dd45188e26695275510e67e45db6ea3c0924be76eab824324"
+digest = "sha256:00f991319484b6d948d71e63ad35c5d5b8b1b5718de0f0c57ca9988fb037ff4e"
[[tasks]]
name = "robot-coding-bench/behavior-rearrange-your-room-i00-privileged"
-digest = "sha256:fa2526bea7740f99669838ada7beb648d94ebdbb304a8a17d29e1fd79398ba9b"
+digest = "sha256:35b94560026b60ea8299f91e7ef386e4e9c63c2d65d05579481753cd58a18da2"
[[tasks]]
name = "robot-coding-bench/behavior-rearrange-your-room-i00-standard"
-digest = "sha256:ffcbc78c22b75ce838cde97e962d20de6026edee41958b14834d0d1f5dd6b6d2"
+digest = "sha256:7de02a8e3508baf866d2b51122f141e743b121d86a43628a2b4da6cbb04d7bff"
[[tasks]]
name = "robot-coding-bench/behavior-setting-mousetraps-i00-privileged"
-digest = "sha256:46cb23749de9e01864e61b4e0f897dd83c230f4d57be0b250f06806cb169c926"
+digest = "sha256:96e4a6ba37f26068fece1c0214547dfdd506a0cc328da70010c1f36e8de7882b"
[[tasks]]
name = "robot-coding-bench/behavior-setting-mousetraps-i00-standard"
-digest = "sha256:593c7424f0bbf8f6dec2fc1a3108be60a689f2ecc69c6e31d0856be68c16d490"
+digest = "sha256:acf6cc3a36567635bfae92f700a3e80bb67a32370c9e99456589906381d50991"
[[tasks]]
name = "robot-coding-bench/behavior-setting-the-fire-i00-privileged"
-digest = "sha256:f6cdc5a9d6ab5ac643a7dc3f5648f4ff20ff2726b75a5cfaf45691336d5dd8c2"
+digest = "sha256:a716911aadd06c939835885cf0aed60e2a951c0a4dec39229a833c0ce5baf2bc"
[[tasks]]
name = "robot-coding-bench/behavior-setting-the-fire-i00-standard"
-digest = "sha256:a7eedc4cdb0d1ee5b5ca281d2faff614e3ad006da2ea21ab235cda7143cbca61"
+digest = "sha256:18945067c43fab7ec9ff529784d6e96ec8ab5fe12056ebd5383e91132db26fb2"
[[tasks]]
name = "robot-coding-bench/behavior-setting-the-table-i00-privileged"
-digest = "sha256:c6067752f8f074fb7461983e190b80af10e04738c15137eb8cfdb4b47a9b45c4"
+digest = "sha256:64ef62ae4b8c99e138cce85b3112be9c71c24b442c9e4efd6d64f1cf60573d17"
[[tasks]]
name = "robot-coding-bench/behavior-setting-the-table-i00-standard"
-digest = "sha256:fb6ce07862b8fe76bee07c0fee43821f39663c047f6109dca364e747f18eb40a"
+digest = "sha256:112102708137f7f7b54332a14dc9f6e9cab39ddecb005498ff1b643c19792ddf"
[[tasks]]
name = "robot-coding-bench/behavior-setup-a-bar-for-a-cocktail-party-i00-privileged"
-digest = "sha256:819212f5c4363779370c5a598a209793ef0e3e49584e2e57b44974ae25c176a2"
+digest = "sha256:875e01d3e811b8e787d5f23b2137204afb03e83009c9e301f840bcaef1204d13"
[[tasks]]
name = "robot-coding-bench/behavior-setup-a-bar-for-a-cocktail-party-i00-standard"
-digest = "sha256:0bbdaa694af24ad59e1cd66060d6d9d50a0a0a0728f576f3940a9de9ba289ee3"
+digest = "sha256:eadeeb424196b75e90da7dd945096e1d667b5b834d8c093867669d9a93ee16b3"
[[tasks]]
name = "robot-coding-bench/behavior-thawing-frozen-food-i00-privileged"
-digest = "sha256:e937af4da80eca5317853b2ae7d8b86e8ed8f1dcb29aed4f4cb5c6670bb7332b"
+digest = "sha256:5f38a221a8d743c3669a6a72e3a3e53aa4d396422ea608a8eafbaa46f9bd1a2d"
[[tasks]]
name = "robot-coding-bench/behavior-thawing-frozen-food-i00-standard"
-digest = "sha256:c9d9432d028bd5b009981749a57a15f831b346fb09b7f26175f2f86c167c74a8"
+digest = "sha256:72b8e852b9e2b5e02c49bf0348e84bb6b737c92fff6c59563ccc9f214af399a1"
[[tasks]]
name = "robot-coding-bench/behavior-tidying-bathroom-i00-privileged"
-digest = "sha256:b97be4c07d6ba29fcde01c167a759fa0942b29178ceac724742815e7260b1f98"
+digest = "sha256:316c7f927b43cab2fa53bf73f24c89049b47faa96179d65a61d9e6472a3c1f50"
[[tasks]]
name = "robot-coding-bench/behavior-tidying-bathroom-i00-standard"
-digest = "sha256:a7195b5c973699859d25090877030ab5b3d391014a2165e01d9c25b31d922ed1"
+digest = "sha256:71cd7642676ca1dc9b8952ba34bfa2637f1fb9367d5ac16791abbf7ad4dce5c4"
[[tasks]]
name = "robot-coding-bench/behavior-tidying-living-room-i00-privileged"
-digest = "sha256:1a37288bba20975643a64c053ddb566ffd11d32d51b95482eb3aa4f663eb3dbd"
+digest = "sha256:005de7269325ad5fbfea8ebe4b9f9feab43e0e5ca24cbe832fdd0ee210370f2e"
[[tasks]]
name = "robot-coding-bench/behavior-tidying-living-room-i00-standard"
-digest = "sha256:c8f604908a5f516cfebcd9e7ad98a961bfe91fcd492cb2debdb37d4e7ec78ae1"
+digest = "sha256:769a1144c3b843977abe916bae589519dd54c4f3ea4b7cccc5744d780762520e"
[[tasks]]
name = "robot-coding-bench/behavior-unloading-the-car-i00-privileged"
-digest = "sha256:06a57e0feb7b466e58a8fe084a90d8f8865301f3e1c2851c68e3c54f48785805"
+digest = "sha256:1edd64539a01f62a372f029b1f0215b7bf103b1e6ad3694baa5110feae2055c8"
[[tasks]]
name = "robot-coding-bench/behavior-unloading-the-car-i00-standard"
-digest = "sha256:72b7eb6656ad9ba9e5f7561b7fa3a65f28a5c397d3d617c4d77b2b333c7d48e0"
+digest = "sha256:923d77cb8908b9f81ce4df0816a59ccba7139bfdc7e2fe6ea12d8f6894a6c29b"
[[tasks]]
name = "robot-coding-bench/behavior-assembling-gift-baskets-i00-privileged"
-digest = "sha256:b0a3d9999364f5ef922a666247a77ecffcd91ee9b3c99b1c19a56f0664034403"
+digest = "sha256:136fc9c90daa3cfb6524412786aefc279509f7665b98cae8c729b253910e283a"
[[tasks]]
name = "robot-coding-bench/behavior-assembling-gift-baskets-i00-standard"
-digest = "sha256:a30ad23ba4e446a6a149a8115c17af2589aaf146ede3a553876c84b2a7053b04"
+digest = "sha256:245cb3f1e9446bebb196a6cd0fcc35d667e00b499d2f84fcf1165159af6acbca"
[[tasks]]
name = "robot-coding-bench/behavior-boxing-books-up-for-storage-i00-privileged"
-digest = "sha256:bae196f3310ec39bc249d54084f8eeeb6209fe07b9bdf52cb0974357339c84d4"
+digest = "sha256:56c31c999a8ceee00e3c62e24ec57707aaa0d04c0e5e50b3c3dde0bdd67a4c93"
[[tasks]]
name = "robot-coding-bench/behavior-boxing-books-up-for-storage-i00-standard"
-digest = "sha256:24a94a7135ef7a5e17843dd6d06537cf77f4b21393c4370e9d5787f68060e77b"
+digest = "sha256:593013611c090dded0deb821f944da4865b16346f803d3c404ca7e7fdf20dde1"
[[tasks]]
name = "robot-coding-bench/behavior-canning-food-i00-privileged"
-digest = "sha256:b110686f963adda071dcef2fbb9bfc90e76525ca58e2ae62a7b71e6ec394365e"
+digest = "sha256:3efe2422889a86b8caccdd889912ccdf956128641563121c9e894a9d2841ccdf"
[[tasks]]
name = "robot-coding-bench/behavior-canning-food-i00-standard"
-digest = "sha256:41e5b525c9336170de200616aa8a6619159fcee252a80f40b8749b5e12169a1b"
+digest = "sha256:3e4f4a1fe4e1e1bd5c65d94c5812d35a3712b73e2370c9c8b9f3212818486771"
[[tasks]]
name = "robot-coding-bench/behavior-clean-up-your-desk-i00-privileged"
-digest = "sha256:9aa72e6686da8ab5db06a82e5b922154e1d5b1aa9cdc09440dc1e91c9c9a1899"
+digest = "sha256:e3c5144ba005b6ef496b6657c971fb6df5cabdd5621e1e889614981c5167cc62"
[[tasks]]
name = "robot-coding-bench/behavior-clean-up-your-desk-i00-standard"
-digest = "sha256:268afe9b9212a06b15275328e524bf1c51c12db7aacd8e1dd5ebfb7d69c6c4a3"
+digest = "sha256:a0b1b9955ff52dff39610de3a718354a2e6235dc908fffc4a045a2da40813e01"
[[tasks]]
name = "robot-coding-bench/behavior-collecting-childrens-toys-i00-privileged"
-digest = "sha256:b9d4de4128088a1ec0367d5af6e7089c127405f63832fc81a28b8be27b063835"
+digest = "sha256:07d8518cb107f90a2b351e38b604cb86b4ba5d6bcd1b4f50a82f29049946d1b1"
[[tasks]]
name = "robot-coding-bench/behavior-collecting-childrens-toys-i00-standard"
-digest = "sha256:443170602071046a7ffa8aa80054111704c1e2ae945a6d2a59f2c5195de5d98b"
+digest = "sha256:83309bed2e2810e627301ccc32fd0abb33d22d1954fe42d36c268e565535cd69"
[[tasks]]
name = "robot-coding-bench/behavior-cook-brussels-sprouts-i00-privileged"
-digest = "sha256:1b48997f404fd3004b02208e13f29126ad60fc232c65155b9c6270b2ad92ae4f"
+digest = "sha256:6ffed6b35ee4f91e509e4476a76cc3dc81d2b5e4b80a5cc496b755c922b11766"
[[tasks]]
name = "robot-coding-bench/behavior-cook-brussels-sprouts-i00-standard"
-digest = "sha256:0468e42d7082248c390699bc102a5e2f1d9848c13ccfc07f40e26233edad962c"
+digest = "sha256:324eebb6863fb730d66f1a275999dbefb369393354305b75c06d4d6e3a3cb21d"
[[tasks]]
name = "robot-coding-bench/behavior-getting-organized-for-work-i00-privileged"
-digest = "sha256:8574ddcbe385a987dd1105a70ce9dd093ff6f747d23575bb847fc928751529cd"
+digest = "sha256:44953d1c03a2c87f581fe91ab42bef3a9d6ff9b47806b1890ab0e82c9703fa3f"
[[tasks]]
name = "robot-coding-bench/behavior-getting-organized-for-work-i00-standard"
-digest = "sha256:06a57e5bddbd58f377fb61858d294a21553f42299c0b502971d8ed3786669420"
+digest = "sha256:0123484bc2bb28e6628bab261a0d4f775b582d7b71feec9b0a5114618d94858c"
[[tasks]]
name = "robot-coding-bench/behavior-loading-the-car-i00-privileged"
-digest = "sha256:52c9199408b2025e4c9f30b999d239a9cc6abb6ebe1a9224f7e809ae1ca07555"
+digest = "sha256:742f1792dab3e085de7160982180afc08565a1274ced919eb8572e4b89f2726c"
[[tasks]]
name = "robot-coding-bench/behavior-loading-the-car-i00-standard"
-digest = "sha256:47d16721a597bdf6975a23f334358141460223b65e4f9c0abe7547ee5900f3e7"
+digest = "sha256:7b1b07eef83f8174a5969e4c3efb0d672e930188728f60e250e4275dcd2aabc1"
[[tasks]]
name = "robot-coding-bench/behavior-make-pizza-i00-privileged"
-digest = "sha256:94bd7a86a3093a3a7565a06ac77701ac6f5c0444852d93147b72c23a2dc2f584"
+digest = "sha256:f52e4ca080bc63a331aca6039ec7e5a82dbde0cf6b1bdf1a78a2e033eee26f26"
[[tasks]]
name = "robot-coding-bench/behavior-make-pizza-i00-standard"
-digest = "sha256:b484f203301dcaa9f17d256e18f5b68d91c62be46e945c4d7188648371139897"
+digest = "sha256:f96fc311c8c1a4894b4d6c3c2823ced9a13191fe8390dd032d710afa3bbc1c64"
[[tasks]]
name = "robot-coding-bench/behavior-picking-up-toys-i00-privileged"
-digest = "sha256:502bc371af4bb12cbbdde4a676ce16f2fae8be1f736cf65d5a886706425fa88b"
+digest = "sha256:8af311d4d38a1876d1f96d831ac6186aadcb06b3d424bee81a7f503f8181bdfb"
[[tasks]]
name = "robot-coding-bench/behavior-picking-up-toys-i00-standard"
-digest = "sha256:fb5d1a37be4423c4155a211b8540d6eb5ddb44a26cbc7b46d71b841b51c5aba8"
+digest = "sha256:a55240379f87399e8d6c06d35493a93c48fe39b610183257b4772ed3f2df01a1"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-household-items-i00-privileged"
-digest = "sha256:dddd6eee75b9be28af3d4f6b570cdf3cf3ad3572cf3ec60763869e3c600befdf"
+digest = "sha256:57311457419e088deed91b156995791c18e6524e15c7c993946981817bae3450"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-household-items-i00-standard"
-digest = "sha256:7c4ff2d3af6e4a13cce38ac8e2ee68bdce2e0963b131572f848c7ad05bfa5311"
+digest = "sha256:ca8c3910c104a7a4a82bf822dc65f7ad72678344cdd6597df709f1ccc4be7e2e"
[[tasks]]
name = "robot-coding-bench/behavior-storing-food-i00-privileged"
-digest = "sha256:fd34e47dc1d76b172ba542fa5120aa00c35ebd21f011adb565c9bc360e1a0491"
+digest = "sha256:9c061ab2800249fc08f0f10d425a3ece032c4dbd37de7a2a0c7359b0a6fc20cd"
[[tasks]]
name = "robot-coding-bench/behavior-storing-food-i00-standard"
-digest = "sha256:4a50f8c563b8b3dbcba20ce977600e3b9417be18d49ad7008f60433e30bf1439"
+digest = "sha256:b7be1c05b17dd63b24c41a476dac695d31170d134ea32ed9dcc614a6191213e0"
[[tasks]]
name = "robot-coding-bench/behavior-bringing-in-wood-i00-privileged"
-digest = "sha256:90a7d390a867d21be0b9a56f58b1ffad7049cb786a31f0834d35b4bdbeb05d51"
+digest = "sha256:9e749ea77a335ec080c343212389d50861f2fbf0a92b526350e8ccd24cfb5df9"
[[tasks]]
name = "robot-coding-bench/behavior-bringing-in-wood-i00-standard"
-digest = "sha256:0939aaae91bdcacfcc2d5e49a3b9b6321bc1d9023903502f243f54e61287827c"
+digest = "sha256:3cae43fea60fcc2bc4fc8620953b1298d025cab4bac78436f163aff30a1d0d8f"
[[tasks]]
name = "robot-coding-bench/behavior-chopping-wood-i00-privileged"
-digest = "sha256:92e0a0d1b5de4c09341950e914aa96697c591e15f99b9e68ca25bf6165baba16"
+digest = "sha256:8d7e009ee857d7e72dd50a3325bd0664beec921af281aa51da3866bd8614da1e"
[[tasks]]
name = "robot-coding-bench/behavior-chopping-wood-i00-standard"
-digest = "sha256:e1e362e3edbec0a49dd43668504f483b906cb4201c41122fd967e76a6c052342"
+digest = "sha256:57f879fb374f9910a3c92aa98c8261c19bd675ed59e46048dfce9b8ebc293a7c"
[[tasks]]
name = "robot-coding-bench/behavior-clean-a-patio-i00-privileged"
-digest = "sha256:46923f66d8f3c63afd0c80f390783ed237f0510466df25599941ad232cc1067d"
+digest = "sha256:349c8622a206e4d73d4675a291af19df6c3873c4ca0088d9b1632f5f36ba0b2c"
[[tasks]]
name = "robot-coding-bench/behavior-clean-a-patio-i00-standard"
-digest = "sha256:21766919d50cb9ad73fa50c814361978a1165567d2d35db25f777692fd74143c"
+digest = "sha256:de8cbbee819100d52076889812cedb786ea6c56570b42c82d68cc9896fdbac3b"
[[tasks]]
name = "robot-coding-bench/behavior-clean-your-rusty-garden-tools-i00-privileged"
-digest = "sha256:81ce71b2bf83e09f6a9397ba52d3121db5232382bb698190a646360b626a8c28"
+digest = "sha256:7df2ddcd562913b76b281c73cd4ac0a7bce4cd76d9d9665f161e15dfaab4bfd3"
[[tasks]]
name = "robot-coding-bench/behavior-clean-your-rusty-garden-tools-i00-standard"
-digest = "sha256:90c265ee65293911281b903296008ab3e4c83872517061e22f4b6a3fbae9794a"
+digest = "sha256:e9b3cfd15841acf716ab2643bb4572377224e6d4e2179639951a8dcb8488b613"
[[tasks]]
name = "robot-coding-bench/behavior-cleaning-up-plates-and-food-i00-privileged"
-digest = "sha256:d1ad3b818d152afaeb288482a541406a5523a6d9c7a727a343ccde5ad2aa063d"
+digest = "sha256:c25fc0dbceb567b33eb107e99fc5f3bd9cb0432face42d0d81978c3f440ae22e"
[[tasks]]
name = "robot-coding-bench/behavior-cleaning-up-plates-and-food-i00-standard"
-digest = "sha256:14a1319d028c888d8849ff5a9a0551fb804b94976c11b0eedab256af8a34c6bc"
+digest = "sha256:15a576919bd83e46a8f65b2db62c63d810c3e02b02dfe7a2569644cf0543e2a3"
[[tasks]]
name = "robot-coding-bench/behavior-cook-cabbage-i00-privileged"
-digest = "sha256:9f3facffa1bbb36e4bdcf0556b14b990bca0e1eeb79995827795c52c2b38a2e2"
+digest = "sha256:bb10c48441b255ebf3bcda9f545e7cb15ff03b6bf1d9520aaa608a5af34d4d8e"
[[tasks]]
name = "robot-coding-bench/behavior-cook-cabbage-i00-standard"
-digest = "sha256:a8aeed542534b45e4e9c930f9e67f2c5dcb5dca2b745e314014aa1392e204bee"
+digest = "sha256:c6b24dbed27eea6ef394cc8b81259ac236b5961b73c77584321b5b4864373f98"
[[tasks]]
name = "robot-coding-bench/behavior-freeze-fruit-i00-privileged"
-digest = "sha256:6354c92dc7ee4b1ac00d5dace6711f4babe1f1b1fea9f408e63524d931d67ca8"
+digest = "sha256:fbf9626a5965e19da9732e825c8aa1f60f4229c0b5b6ce35573a971a80dc8385"
[[tasks]]
name = "robot-coding-bench/behavior-freeze-fruit-i00-standard"
-digest = "sha256:ea848ffe9304705a11955c5ec044e9a6b84c43a6269c9f1d5f0b9e5d0d1b2220"
+digest = "sha256:594aae99e4d7ef7ff8fe05b825849cf4b0699b0c6c0f326a9ea652062a2456b7"
[[tasks]]
name = "robot-coding-bench/behavior-freeze-pies-i00-privileged"
-digest = "sha256:73f499a3879d815728bb0e195cfdacd2c69d17b89fb51f59e479d9c4afdf8c9b"
+digest = "sha256:c8e8f18c83df59728b26bdecf711a391b578a252bf13eb959aeaf9eaf6b8611a"
[[tasks]]
name = "robot-coding-bench/behavior-freeze-pies-i00-standard"
-digest = "sha256:3abd2b24db9b0880a9272d536c3a16c6ce064bed773cd8a205a9108b806b0268"
+digest = "sha256:29f90ebaece545dd77790f4c8e668394337fb43252bedd6bfa17b7d445959bd3"
[[tasks]]
name = "robot-coding-bench/behavior-moving-boxes-to-storage-i00-privileged"
-digest = "sha256:c5f2e3355cdaa8d82681bb3fc710bb54ed6129c1c9f16ddd6b4187f10d2eaac9"
+digest = "sha256:47a543cd70daf6f7a2f20cdcb2d5785701cee00cfb30b189c1270796624f74cd"
[[tasks]]
name = "robot-coding-bench/behavior-moving-boxes-to-storage-i00-standard"
-digest = "sha256:959bf7e0165c7b3be2ee4624e73099fcfaf54c00305be6368308a9b627ac77d2"
+digest = "sha256:29beb905789e4895c65e4300644bf03c003f55980ce4ab93411c6db42135a38f"
[[tasks]]
name = "robot-coding-bench/behavior-organizing-school-stuff-i00-privileged"
-digest = "sha256:cce0ebf5804646ee7958ec48cc8dfb9d31be656f122e5e0e728eaac23b5156ee"
+digest = "sha256:136e6bc8f757f9d4b710c18ac55e65ca97c8e9c4c46167a526e2b9cd3b25ddb8"
[[tasks]]
name = "robot-coding-bench/behavior-organizing-school-stuff-i00-standard"
-digest = "sha256:e7e681eda2367842df7d01694f97429d64f2c3c2850d6f76b0f9c75ca87a12c4"
+digest = "sha256:509c7372ff65b81a69787f8ce831e924206b42a8832fea1f655df554dbe7e5cf"
[[tasks]]
name = "robot-coding-bench/behavior-polishing-shoes-i00-privileged"
-digest = "sha256:4e43bf5f22407f8d4d06798d3cb616dc8e3caea6453b4950581d6ee3459cd37f"
+digest = "sha256:d12bd1ada903c6131a317c1a71366f4733fc6004636a8f91683411285a0cd007"
[[tasks]]
name = "robot-coding-bench/behavior-polishing-shoes-i00-standard"
-digest = "sha256:c44ad5a1b0763d5b1cb97f6f22f891f673a7494a29be10063e4d5abd96c80bad"
+digest = "sha256:303503450fcdce9e98c99eb1139548c36eaa4768a5f23052c02daf8fb469d9fe"
[[tasks]]
name = "robot-coding-bench/behavior-putting-away-Halloween-decorations-i00-privileged"
-digest = "sha256:256967eb4511fb91ea53ed35eaba7e88648299332bef46021e8b125072671cb6"
+digest = "sha256:1e3d88e84e7f8e37d9df9b7b459b6143978f76fc42d45ca054d40bc45603586c"
[[tasks]]
name = "robot-coding-bench/behavior-putting-away-Halloween-decorations-i00-standard"
-digest = "sha256:d44b637638101eb0ab131b7351db7abd120a088682774b772936082ac6aa7dc8"
+digest = "sha256:a2fc1260c34773596fa8cc021a9ce1adc2c714507bf1eae31d2918fe5e2b196e"
[[tasks]]
name = "robot-coding-bench/behavior-putting-away-toys-i00-privileged"
-digest = "sha256:f7e41eb566ad89dec324b317c7d087557bded4e3872048342aace08531c848b9"
+digest = "sha256:c4b54e821dc795d680a48ddc2d2632efee55faba40c36272b65a06580dc6f53c"
[[tasks]]
name = "robot-coding-bench/behavior-putting-away-toys-i00-standard"
-digest = "sha256:3f3d2f17b00359c702af69968eff73cfba2b2ebf91fa58321188fc261254cf15"
+digest = "sha256:a5002eeb840f47a4a0a4924ec9ed5f4ad2b9391966c0786d06f4df2b8618dc81"
[[tasks]]
name = "robot-coding-bench/behavior-slicing-vegetables-i00-privileged"
-digest = "sha256:2a8f382f7ce484b7233c98e146f5fb82d798fe805970281a9faeb3005b85fd6c"
+digest = "sha256:14194db97fd4b4db704a6ab6a2a8c6f47efb12f4be75d267d23ac80ec503e4b6"
[[tasks]]
name = "robot-coding-bench/behavior-slicing-vegetables-i00-standard"
-digest = "sha256:f158c2e1da42bc31d61771512d9bf6c9eb44fd02ac22ebcbdcf8b9ae82231203"
+digest = "sha256:1a3d4234f439e2b222ca3a9a64111187ab6e149c157b957e316c440590411bb3"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-vegetables-i00-privileged"
-digest = "sha256:76ee0772924fe36d606e75aa6625461fedac92ace1322bc3d5608fa34f47759c"
+digest = "sha256:0aca3833e80df48cea05a7957e870c0faa9aae7d6a29c85f825a0cd28d36ae3f"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-vegetables-i00-standard"
-digest = "sha256:822373752048fbf8749b61b54343282c92ffbb7c41a19590e1af1fc91edaa17a"
+digest = "sha256:945097fbc77f8fbdbe225206bc112b421e2c06bba3708b7094fb6d545624635e"
[[tasks]]
name = "robot-coding-bench/behavior-wash-dog-toys-i00-privileged"
-digest = "sha256:996e3bc2815cf489883f3eba8e73a072edfd5acb8c85351d6fbe9ef6b0a4f9d4"
+digest = "sha256:2b78a7e84bc7f2062f5dd0b7f6b834a9675c9fa778c42be80377ba10cd9d370f"
[[tasks]]
name = "robot-coding-bench/behavior-wash-dog-toys-i00-standard"
-digest = "sha256:fa891fc3bac2b1ce80f851d7716f8379bb47644ff068229477d96d665827a62a"
+digest = "sha256:218813c61652ce44edf0b8ad4afacf6ed22d0bb3380dc1c35019f262c15a3b3d"
[[tasks]]
name = "robot-coding-bench/humanoidbench-loco-walk-i00-privileged"
@@ -4043,315 +4043,315 @@ digest = "sha256:a515e9a6868f5745811e349340a399ae48c1123e568aab35d1882451d79ad6a
[[tasks]]
name = "robot-coding-bench/behavior-boxing-food-after-dinner-i00-privileged"
-digest = "sha256:ae53100e7be9b6fc1a3d93d68d868d0b5743f567baad41568c9e77c70911678e"
+digest = "sha256:760e846b929b3bef623a416aae5489d003825d93ddd8d02581c1d2590465e2e1"
[[tasks]]
name = "robot-coding-bench/behavior-boxing-food-after-dinner-i00-standard"
-digest = "sha256:af0dc4f759d801cec4e39cdf76ac3e8b226b2db1f47e212e6ecc82002615b2ef"
+digest = "sha256:244043df9ee91688c43ec84c66c54ffea3c1f10c1dc3f9e217c1fb7b996d1d1d"
[[tasks]]
name = "robot-coding-bench/behavior-bringing-water-i00-privileged"
-digest = "sha256:8116324bc2eb96d4013bed7f29b56566d7324012f23a8c62e55d5553091e849d"
+digest = "sha256:5d943b88151ee1b4d484a480a979137566448fdd7f1efb59ca207b733024cbe6"
[[tasks]]
name = "robot-coding-bench/behavior-bringing-water-i00-standard"
-digest = "sha256:ffd32ba7bbc3ff09da70a126e808e1cc33f72ce5d4b9256251cbb04048068f01"
+digest = "sha256:3b099f0681fec2caed0c51bc0f1ec4f5dd3080f60522b956ec8b9ea1c80fd7df"
[[tasks]]
name = "robot-coding-bench/behavior-cook-a-brisket-i00-privileged"
-digest = "sha256:d680a70a8724c089196df400a9358da33deefb7804ab30b28ccbcb8bc6040746"
+digest = "sha256:0105a41b9cb00c9f97270cadb101a1d26f9f959901074454e8a8ae37ff6b44cd"
[[tasks]]
name = "robot-coding-bench/behavior-cook-a-brisket-i00-standard"
-digest = "sha256:a5a41d2f7949dcd8fc04b1d7b10fadd87ec1a74d4d85896eedd813a9ddb22a8c"
+digest = "sha256:d73716386702e220ace720ecc2e6ad816e1edd0a95b62d8be4bdebdb7a39bd82"
[[tasks]]
name = "robot-coding-bench/behavior-cook-broccolini-i00-privileged"
-digest = "sha256:4e60d7813db75e69c7e80f49f0a7803c9b94f21509b85937e785a59a29f6bf79"
+digest = "sha256:c1a0e4c67c4fb5b3fa00be1fc4275798dc84074644f6ad92fafc3a4828a44295"
[[tasks]]
name = "robot-coding-bench/behavior-cook-broccolini-i00-standard"
-digest = "sha256:854113bc518a108d4c4348402f3e05338457b17f8e4c57a31d7dba94138099fb"
+digest = "sha256:729fcaf9073d196f7941048984bc3acd1bdc84de7ed607c0d444a0d63882ddb2"
[[tasks]]
name = "robot-coding-bench/behavior-hanging-pictures-i00-privileged"
-digest = "sha256:b4f218be5d49dce0894e8e30201200da2ef07e6189c8fe57b24ec85c08159a02"
+digest = "sha256:2479288278b5613b8feb1760d93ca05ea52cc54013be9476b7ac971589087fcd"
[[tasks]]
name = "robot-coding-bench/behavior-hanging-pictures-i00-standard"
-digest = "sha256:6eafd809b881f3de128e982ff39b5b06c19867ba935808ef7fbad3d68d41e9dc"
+digest = "sha256:a5c4d5473729b95dd6f7fe6c5bcf70c20437faa9c609359cad539d6f50e17173"
[[tasks]]
name = "robot-coding-bench/behavior-make-gift-bags-for-baby-showers-i00-privileged"
-digest = "sha256:b8e4be50f930340a095620c7e65a19e29db9325cd29b420c5da10fc9f8cdd799"
+digest = "sha256:69f46b0575eb9cb0e1206ed7da8b97c7686d0a73cc0c65b545739d1571491a8f"
[[tasks]]
name = "robot-coding-bench/behavior-make-gift-bags-for-baby-showers-i00-standard"
-digest = "sha256:eefe7ae0554f0d5d646c8a768125b0743a893a97d361f2c0879ab9616b1b41e4"
+digest = "sha256:82e07df674f42ad4f090776e35a84000a3188d145e609b3018321396671e1195"
[[tasks]]
name = "robot-coding-bench/behavior-make-rose-centerpieces-i00-privileged"
-digest = "sha256:51b46f1523da7ddeec4f4ea3fa42b641cb22040d14daa6390c99c8cf3d906c8d"
+digest = "sha256:9d42d169eda1ff3667b11e8bc3987619dfc6241d31cc3203bcc7f9d25f5e2fe7"
[[tasks]]
name = "robot-coding-bench/behavior-make-rose-centerpieces-i00-standard"
-digest = "sha256:557684dcf8c86cf065a1ab695361671e25d9968381c04cdb4a591cb1e1a2a188"
+digest = "sha256:cfb3c34670a1463c486969d69623186bed7d7cc10223f0d53965f0310c57edbe"
[[tasks]]
name = "robot-coding-bench/behavior-organizing-art-supplies-i00-privileged"
-digest = "sha256:ae926e0b180b40c29bacbd7c4c2f4dc070d8b7f13b506caf88b554407fea7fde"
+digest = "sha256:80adab82134ec87571045315aaf8d687dc385047b9e728702828a4d945b11921"
[[tasks]]
name = "robot-coding-bench/behavior-organizing-art-supplies-i00-standard"
-digest = "sha256:045f90cd619bc5a2d18a737498a68a2a57a0e0f59c354174a6c6c861a43c0e05"
+digest = "sha256:81275e771505354b0ac283f0c2b9e94bb9c44491eccaaac06a496801ef087cbd"
[[tasks]]
name = "robot-coding-bench/behavior-packing-meal-for-delivery-i00-privileged"
-digest = "sha256:c95e9f92678f081e6148636a93c7ddeb5f98d764a654e98ae2b2424b1e03a0f1"
+digest = "sha256:814fc2b03622c61275135ef446f66822eab1b168ccb3f194c522f2d4a00ef8ce"
[[tasks]]
name = "robot-coding-bench/behavior-packing-meal-for-delivery-i00-standard"
-digest = "sha256:9608eca730070ba6fb564fc215b95d7a631fb5ae97dc8a6689fdf1db41ec8d05"
+digest = "sha256:52e25dedf5d4262becaa73e36b35723021c5a27f21f958f6cb77610258b056d5"
[[tasks]]
name = "robot-coding-bench/behavior-preparing-lunch-box-i00-privileged"
-digest = "sha256:e26a52c648f767dda1cdeee93176c2e68b923f37c1bacc6c76ddbff5aa89cf86"
+digest = "sha256:eb1a91e8fe79b66df9c2fb60fb172437c2a1b21c6d27cd916f0fc76aba42aebf"
[[tasks]]
name = "robot-coding-bench/behavior-preparing-lunch-box-i00-standard"
-digest = "sha256:72565c113f5aff2ebfa76052da7b272c2ad669a72b05a757b5351f4e943d7a39"
+digest = "sha256:a5f6bb39dabbba787ca7c3d3b9792affcd48ef8b9dddec48764118e651c3f8c5"
[[tasks]]
name = "robot-coding-bench/behavior-rearranging-kitchen-furniture-i00-privileged"
-digest = "sha256:e4476b199ed05992e0f5f6c2563755d12e40f7d9e4914a8b79229d6210c3929b"
+digest = "sha256:dbc969281aacaeec43ac99ba55c042ede86c3751ad5d2f06b2e34844f502cdd3"
[[tasks]]
name = "robot-coding-bench/behavior-rearranging-kitchen-furniture-i00-standard"
-digest = "sha256:562d9fae5aa7557a84d878725613b7fe4ce78c8ccdd2ac1c528d0b5be5e40b6a"
+digest = "sha256:0cd4377f7c9d3fbcd2c5a08df0bb0d71e4e63e98ba3f6953068214675944d46d"
[[tasks]]
name = "robot-coding-bench/behavior-set-up-a-coffee-station-in-your-kitchen-i00-privileged"
-digest = "sha256:ed4e9528f4da9900447ba053882fa2d7a6c4ee4655f19c240de373113cc47405"
+digest = "sha256:4d4cc57f7b55aefa428773a1ff428b561ff0b00f661b9557e49a9f9a6e176ec8"
[[tasks]]
name = "robot-coding-bench/behavior-set-up-a-coffee-station-in-your-kitchen-i00-standard"
-digest = "sha256:79da237530a6833c2089c06253e9de647c1924a0eec0b0a301a769b025d805e1"
+digest = "sha256:da36f0966e7b13d4532c044e244927e8b5d3e6a05bf609e3a324378182aa3add"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-books-on-shelf-i00-privileged"
-digest = "sha256:a5cc313014481022372684b551b56da90414416bfb21d4dd4b5b5f63577781a4"
+digest = "sha256:1c328fb8e62fae895a39ee9a492e6462ee895e2b8ceb62d1edad6f826c973da9"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-books-on-shelf-i00-standard"
-digest = "sha256:e10186d5c7a246e2392f54ac61c1a2e4e14140712dab06c9ece0be77a3d90605"
+digest = "sha256:1daadc8c8bcd4884dfe6e594046c1e6db32265e5ea0a1096232019dc444da057"
[[tasks]]
name = "robot-coding-bench/behavior-store-honey-i00-privileged"
-digest = "sha256:8891f6d098b0c6e6ae71c7267c4e35c5a9e1e81b6ed0078de9dd32068062ae84"
+digest = "sha256:896fa64268b05da36384dae2553564ce94429c6a71cf51c49fe1edbf9f1ae30d"
[[tasks]]
name = "robot-coding-bench/behavior-store-honey-i00-standard"
-digest = "sha256:9083d49d44eb5f4c2d779a155ccab154aab7fba1c6d4e9f64ddb5dc055e1c187"
+digest = "sha256:0506581f7ec20ba5e01f19939f81f0542b503a6af920f8352cae6144de6b4c9c"
[[tasks]]
name = "robot-coding-bench/behavior-store-produce-i00-privileged"
-digest = "sha256:268b7f9d761564c82013f70f3e96b81f5fec854871e33e5541fe89324b7e892f"
+digest = "sha256:7d8d8eafff191f2f899fc29703d62cd0a666f72a310f9c6cc212f10e13d70a1b"
[[tasks]]
name = "robot-coding-bench/behavior-store-produce-i00-standard"
-digest = "sha256:5344f8c6e5670f02d33ce6cd15d3cecad17d80141eb293fae231f2614057e296"
+digest = "sha256:3a4ba4d9d4725bb3b61743a72fade7a016c6e69a908fcaddbbb080594f00b1c3"
[[tasks]]
name = "robot-coding-bench/behavior-vacuuming-floors-i00-privileged"
-digest = "sha256:13d327307b26eead50dae8ffe2850311edf5bd9b49d589edab23bcf818c537e1"
+digest = "sha256:63484d925af27cdfc69f32cfd86f3ed4d161c92038dd6fde0f1c865dc041bbec"
[[tasks]]
name = "robot-coding-bench/behavior-vacuuming-floors-i00-standard"
-digest = "sha256:b87eccd25ed736e6d31c64639cd56cff132fb9e2c29e4d3745e729eb92d2f250"
+digest = "sha256:f9e26cc558b49bb27e6deacaadab37fc317c54ccb916159bf47d7553236ebf75"
[[tasks]]
name = "robot-coding-bench/behavior-attach-a-camera-to-a-tripod-i00-privileged"
-digest = "sha256:f1261f78fd2f0d2f2157f5682069c0dfae8c6c96ad16ef9ce7ee91ed268c90fc"
+digest = "sha256:fa46846a845a48d656d4bac1db685de78ffee009b582da09f4f1e3f39ed02948"
[[tasks]]
name = "robot-coding-bench/behavior-attach-a-camera-to-a-tripod-i00-standard"
-digest = "sha256:f29f3b6562c4a07111d6c259e850ad0e3d14249ea809c00e9642aa0bfd51ddef"
+digest = "sha256:b7df609a93b8b1a6ea3959844ff0d451256940d6d47c12598274a87ae17ec098"
[[tasks]]
name = "robot-coding-bench/behavior-chop-an-onion-i00-privileged"
-digest = "sha256:6ad16cf23a48bea3ab7d49a6f13a548775852d8309e99e5e4bb420d11fe0cc1f"
+digest = "sha256:7405c9ee8f45fae64c0043787fe269457f2e257ff66f7fbe39f510e3d2207238"
[[tasks]]
name = "robot-coding-bench/behavior-chop-an-onion-i00-standard"
-digest = "sha256:a81ec6b9054c15e3034cab9c91aaae22a66034d3e1730c7e34ad544c13c248ca"
+digest = "sha256:134914635d3328ea5ec1d78461c111b80c13f169572eff4161e17fafdd8284db"
[[tasks]]
name = "robot-coding-bench/behavior-clean-a-keyboard-i00-privileged"
-digest = "sha256:f23fb668079e2ccf5055c2c8c4940344e09134c189eb1520a6a182a26940edf7"
+digest = "sha256:90b8f956c6d1c514e25178114b079944f40579942bdd5df2f2abc13c5006258e"
[[tasks]]
name = "robot-coding-bench/behavior-clean-a-keyboard-i00-standard"
-digest = "sha256:1a2511b80ddef0d713b778f3578bf908925c76f45d2698bc5294bc7cba149c1f"
+digest = "sha256:c10e40c2b81f99dc79dbb323d2b009fb75442828b0e993d2cf5dd5a4f6fbb567"
[[tasks]]
name = "robot-coding-bench/behavior-clean-a-trumpet-i00-privileged"
-digest = "sha256:cbb151a5372ff1e913e04ed8b7ea0aebd72b5514bbf8f1eee5debeb0c615fe80"
+digest = "sha256:9dc57bd8ceea0870a3a03ecce153bdc715f61d5fe880510b86eca3324f86b86b"
[[tasks]]
name = "robot-coding-bench/behavior-clean-a-trumpet-i00-standard"
-digest = "sha256:c4912ba7e68664de17bfb751f884126d2661db43fa74874c4429dbfce3e95cb6"
+digest = "sha256:0ec0554938e3cfb874e5fbb3eda6ac7a9bcd6345cba96cd26a336ee0d83a0e63"
[[tasks]]
name = "robot-coding-bench/behavior-clean-boxing-gloves-i00-privileged"
-digest = "sha256:c55339e8939b8b9530fb41a774fdd0c7c8d902ac6e33db1930b48873c0d10ce7"
+digest = "sha256:d4e79756982c0c95ac41a6e0963cbfe01a8db71ac2b951eac4dfcadf43f04b74"
[[tasks]]
name = "robot-coding-bench/behavior-clean-boxing-gloves-i00-standard"
-digest = "sha256:4190ee2f084e877ef5a213c1bbe6ca24e405cdfb703fb30b56befe3b0dbc5a1b"
+digest = "sha256:c47311d29b12ea9987229a141663eedd5c8d87fb2a74f3fc749ebc841214577b"
[[tasks]]
name = "robot-coding-bench/behavior-cook-a-frozen-pie-i00-privileged"
-digest = "sha256:7ea2173b29d86d35aa37a7b9633db24a2b53295b0ebf4df301da8d647f254eac"
+digest = "sha256:e63f4a2f2c5e87e57785f2fef0c6d14db1f6725b189320c557589b07c35ca239"
[[tasks]]
name = "robot-coding-bench/behavior-cook-a-frozen-pie-i00-standard"
-digest = "sha256:f118ea4e3bc4c01b4166cfe78b6060e1c63ce6afe244cfb573d0a2de1fc258d1"
+digest = "sha256:76e7c734a6e205aec9406a6ba327f7abf099e78d9b1187ea5b6216b23fe3efab"
[[tasks]]
name = "robot-coding-bench/behavior-cook-bacon-i00-privileged"
-digest = "sha256:c7c7dd47e2965c06943296c5a0077362e45a6d22ae311de18cfcd56687985b8e"
+digest = "sha256:c0ff85248f9d850a2ae7343d3e0df078862acd076fa0e5230561b8105481ccf8"
[[tasks]]
name = "robot-coding-bench/behavior-cook-bacon-i00-standard"
-digest = "sha256:95acd252996405701d620f24fdce495704dd31a537781b8f2c9f5c4fa084fbd1"
+digest = "sha256:51f584b53f2450c60d4b4ca2b1b48d0350be94451304a4344b6203534b4ef3c1"
[[tasks]]
name = "robot-coding-bench/behavior-cook-hot-dogs-i00-privileged"
-digest = "sha256:d11b0a343503d4afbe10ae20dc562a83e549c6162756a2d7a59d77700e16d4d6"
+digest = "sha256:a74f2653df563f10371253fdcd9fa93dd707224a026982acd9ef3d4f208cfa68"
[[tasks]]
name = "robot-coding-bench/behavior-cook-hot-dogs-i00-standard"
-digest = "sha256:3e8182a63d4fb9b0fab740f158f28d958abb416990351f0b6469b2c2f0405839"
+digest = "sha256:864d982b5f71e555f907537524d59e6bd9f8f12e36beaa7673a90b938f830c38"
[[tasks]]
name = "robot-coding-bench/behavior-halve-an-egg-i00-privileged"
-digest = "sha256:b2fd3a92ff40520c6dca10b5cd9b54d847d6230c06595477eb45630017069fa3"
+digest = "sha256:a09ad40508f1d7d2315954b6b71c9a5940ab6751dddb323440bbb10fc3338a45"
[[tasks]]
name = "robot-coding-bench/behavior-halve-an-egg-i00-standard"
-digest = "sha256:dd203186d8f955939f22ca51e4aabd3ca1eceff5e8456a75499f00ef27ec7f93"
+digest = "sha256:97e263738128beeb040a7c8a752605f00146e18176673d6a7fb9cc2d948f4e1c"
[[tasks]]
name = "robot-coding-bench/behavior-installing-a-fax-machine-i00-privileged"
-digest = "sha256:24f18f100454e33eb78ec712204648d292cc819f0dc6c54566722942b86ee3f2"
+digest = "sha256:f8c6721770998736fdb30e279636a3ec529f4e91dbe4cb9df5f1278645913ca6"
[[tasks]]
name = "robot-coding-bench/behavior-installing-a-fax-machine-i00-standard"
-digest = "sha256:ee883370654a5a5319f6c298e392e9ec98156cdc971fb1218781fa85ccfc7f6f"
+digest = "sha256:a3fd13976eb35dda8991e9a3b6a4bf99ae4e3160cbd8677a147fd408bb089687"
[[tasks]]
name = "robot-coding-bench/behavior-installing-a-modem-i00-privileged"
-digest = "sha256:d767e80c5741f60959e7501963236b0228d1ae09a5f9f02f7dcdcb8964193ef8"
+digest = "sha256:78835e9905c2cd4dead512f54683a6347cb0c0db6fa4f0e7a31732a8da9e9787"
[[tasks]]
name = "robot-coding-bench/behavior-installing-a-modem-i00-standard"
-digest = "sha256:2e09ba990dde5435d64d6e2d3bf93a37efe30e56b62cf866d995a0c6f52ac5be"
+digest = "sha256:1ba61489919b53d6bbd29d8f10175fb3a1f2eb198709b09ba7e5f19fda9d093c"
[[tasks]]
name = "robot-coding-bench/behavior-installing-smoke-detectors-i00-privileged"
-digest = "sha256:25298d53e900a75c622cca00f928b11063c7b503bac0456e81ffbfbcdbfb4dbd"
+digest = "sha256:1930cf2a3707c0fca7f5e62f2a2470a62eb36f4b924338fea23508502380257f"
[[tasks]]
name = "robot-coding-bench/behavior-installing-smoke-detectors-i00-standard"
-digest = "sha256:95fa607011e9f29be1505634c99a2cb2c5b2fe501eff8bae518cfe1c69ee7d98"
+digest = "sha256:5f5efa5c196749aa7a67e0ff73a99459ee65f3aab17169d3510f3db9d1317d4b"
[[tasks]]
name = "robot-coding-bench/behavior-make-cabinet-doors-i00-privileged"
-digest = "sha256:856f4688f2b2c3fa6826eba927fb55188cea62c6f69ad66ea9a335e5a8e5d666"
+digest = "sha256:ba2cc0c518bfd9ebefbeeed159797cbe7a00e075ed37d415b704cd2d78c83984"
[[tasks]]
name = "robot-coding-bench/behavior-make-cabinet-doors-i00-standard"
-digest = "sha256:cda0ac38f161cd1342de172859b14f6888ffffa7e147c955a5297840bf0fa4cc"
+digest = "sha256:c3aaf8ae92642df6d18795fb65aecc7379808e142ae1ee23c8711b1113a99bcf"
[[tasks]]
name = "robot-coding-bench/behavior-make-microwave-popcorn-i00-privileged"
-digest = "sha256:b3c497c2e61254e30a20ed244896d1d0dd7765967aa76b25135cae7e15f1506c"
+digest = "sha256:91be37aa92e560e7022c13143f9271345532eb32805738d49684049cb58ff602"
[[tasks]]
name = "robot-coding-bench/behavior-make-microwave-popcorn-i00-standard"
-digest = "sha256:35b6768cf3274307cb4401e2859b8efd7e2649b262afb1170a4e8c264c6c2723"
+digest = "sha256:6fc0b162e193fdd8242b9a213891a3837b5fc6cb0b94af19865eb27f45fe5509"
[[tasks]]
name = "robot-coding-bench/behavior-re-shelving-library-books-i00-privileged"
-digest = "sha256:1daf03431f6c68deb3d38ba050af4b9a6293c1ce2a9219ac21398bde7dc5c7ab"
+digest = "sha256:cab6ec1e1956285e513235eaab9636155d296aeb052e949b35e4338b6b64d18f"
[[tasks]]
name = "robot-coding-bench/behavior-re-shelving-library-books-i00-standard"
-digest = "sha256:f52d900878a619042819137e250f9e7043836fe84c758def2f87bca05f89c7e8"
+digest = "sha256:e38a80b160227e8d9d9d827f162aedca297aead4c0bf8410869e7c675911e4d5"
[[tasks]]
name = "robot-coding-bench/behavior-scrubbing-bathroom-floor-i00-privileged"
-digest = "sha256:08cfcfa2b5e77debd35592a6dd4acf8a354cfbb97eed0aa088699426ecebdf1d"
+digest = "sha256:bf9a7c142bd917c439e75f9ff6444f5d57e40e5f08cf80b06a55a1c052e0cec4"
[[tasks]]
name = "robot-coding-bench/behavior-scrubbing-bathroom-floor-i00-standard"
-digest = "sha256:cb1661fc8b595215d4b47e4bd28166b19e892049524b250333a4f9fceb16310a"
+digest = "sha256:08334a96c7ac62f851fb1309dd121d96ba607c8bffd4ccf44a4c31bc5f8534b2"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-bottles-cans-and-paper-i00-privileged"
-digest = "sha256:3392ea910359add4c854bbeda2757859269466ca9826acca721151704bf35993"
+digest = "sha256:0df2aa5971777a34e1f4644ecb82a4b9369711506fd8084d177d02b05b54f59b"
[[tasks]]
name = "robot-coding-bench/behavior-sorting-bottles-cans-and-paper-i00-standard"
-digest = "sha256:3a096bfb3c9da14457e54aca282966f7d18d608c98660dffedfc3b4477642495"
+digest = "sha256:1505aefac10c04af105e14995d78240b09363d585d8e961401fcb77531247508"
[[tasks]]
name = "robot-coding-bench/behavior-spraying-for-bugs-i00-privileged"
-digest = "sha256:698e3e5dca42575c00918d04e982a2c85d7ca71048529dc4fe6bf52f39730c05"
+digest = "sha256:8e756e3850e795f51a9f4d54d7abe8786f48781c606eead4b80fbd8bc12d0b40"
[[tasks]]
name = "robot-coding-bench/behavior-spraying-for-bugs-i00-standard"
-digest = "sha256:ad91e46d0c1dd9d774170cbfdc589d1c68ef91f2f8347859d61698efaa554abe"
+digest = "sha256:ad262dfe6e6617c028ec50d67ae753fc2bcae20763db5c2f0e73b2dbbfe934bb"
[[tasks]]
name = "robot-coding-bench/behavior-spraying-fruit-trees-i00-privileged"
-digest = "sha256:9742f108afd6437323cde0cad425230d57910cc385bf89777f0476e12b350ed8"
+digest = "sha256:f7f03ef46c1341307c9609cc1284bf7ce8164b495ddc618ab26a5feee020a631"
[[tasks]]
name = "robot-coding-bench/behavior-spraying-fruit-trees-i00-standard"
-digest = "sha256:8b3e4fe262730e5aa864c87ed319d2f0958616cfa5965e84810aca904d2ded27"
+digest = "sha256:bc6da2ffccd555cd7d27e5095caeadc695c07c72aefb0886002aaa843d6491d9"
[[tasks]]
name = "robot-coding-bench/behavior-store-batteries-i00-privileged"
-digest = "sha256:57e61444f5d8f4cd3c564a01f87a5b932c94461942236c50f124a3c57a09b98a"
+digest = "sha256:a21a3da6ab3a84851c6ff3ed2be17906ede06da0b281ee8625b7ed4632ddc561"
[[tasks]]
name = "robot-coding-bench/behavior-store-batteries-i00-standard"
-digest = "sha256:40c28a5393fdc5fb0b9e331f518d80fa4ab60a37604ce394342f2df7773d4434"
+digest = "sha256:1698063b1f825f96d25c60788a0f9c6c6fb92ff8ef3e4a3a8afa48b04d4988b1"
[[tasks]]
name = "robot-coding-bench/behavior-sweeping-garage-i00-privileged"
-digest = "sha256:2f2335ff72a4888a9a8ab95070f8fca611fac768ae0d70557079d23072566794"
+digest = "sha256:fa66aaf965cbd768c99e9ef7cf94110cd8f8d52c07b333c4df1128476daab5d8"
[[tasks]]
name = "robot-coding-bench/behavior-sweeping-garage-i00-standard"
-digest = "sha256:35de71b6f525f5231d9c36de6590e21b19c9796a33c80b5a60c99e86ecd808b1"
+digest = "sha256:67f043f0b0ffa13a310ce069c5cf09f3620257b7df3fc5bec8a56063f3996d03"
[[tasks]]
name = "robot-coding-bench/behavior-turning-out-all-lights-before-sleep-i00-privileged"
-digest = "sha256:7ab65c93becc3318429f044a6640d63fd30c7494113f8b08e7399bf8dfd347ce"
+digest = "sha256:b6162489befe2ac898a1843bcbb5ba471b16d7103915a8737579566919c72c46"
[[tasks]]
name = "robot-coding-bench/behavior-turning-out-all-lights-before-sleep-i00-standard"
-digest = "sha256:c920f7ca5f4d2ee008262467f6bc98eb8d9037c9137781358fd7bd4f3706e722"
+digest = "sha256:bb52a4a79ef1417ab28609b8316fa14eb65c053ebe3393f8e9d6c0e5ab834510"
[[tasks]]
name = "robot-coding-bench/behavior-wash-a-baseball-cap-i00-privileged"
-digest = "sha256:0330c91d8e815c792ff41289d6fdb84e62cabfb89f7cf7dfc0aac85af4c4d01b"
+digest = "sha256:2e4377f83f72374d59e423b6103a7d7535902e89e5b1976f7257310d78bc85f8"
[[tasks]]
name = "robot-coding-bench/behavior-wash-a-baseball-cap-i00-standard"
-digest = "sha256:d0c4e2129725fcaa5b8a356a632f742eeb944c143c0bbb804640d1fc0db5c054"
+digest = "sha256:3b7e09a5602ad55490df5ccc3e5fe82be4d56d2dafc898438e59f20f711cae0f"
[[tasks]]
name = "robot-coding-bench/robotangle-blanket-flatten-easy-i00-privileged"