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.

14.3 KB
Raw Blame

bigym2 stack-blocks — instance i00 — REALTIME MODE (robot as a service; time does not stop)

You control a simulated Unitree G1 humanoid robot with two-finger grippers (BiGym 2.0, MuJoCo) as if it were real hardware: the simulator runs in a service you cannot open, and you reach it only through a client. Like real hardware, it does not wait for you: once the episode is running, the robot moves in real time while you think. NVIDIA's GR00T whole-body controller, a learned policy that runs inside every control step, drives the legs and waist and keeps the robot balanced: you command where it walks, how high its pelvis is, how far its torso leans forward, its arm joints and its grippers. Task: Move the blocks to the other table and stack them on the green pad.

At the start the three blocks lie on the table in front of you (about 0.5 m away, 10° to your left, 0.72 m above the floor; about 0.6 m away, 27° to your left, 0.72 m above the floor; about 0.5 m away, 13° to your right, 0.72 m above the floor); the green pad is on a second table beyond it, about 1.4 m away, straight ahead, 0.70 m above the floor. (Distances are from your pelvis along the floor, directions from the way you face, heights above the floor; measured on this scene.)

Rules (real-robot rules)

  • Time does not stop. The episode starts paused, on a fixed starting state, the robot standing still. Its clock starts at your first submit (or get_obs(seconds=s)) and from then on the robot runs at 50 Hz in real time, one control step every 0.02 s of wall-clock time, whether or not you send anything, until the episode ends. Between your commands it executes what you planned, then holds your last command with zero walking and turning velocity (it stands still where it is); nothing pauses for you, not your thinking, not your tool calls.
  • You are far too slow to steer it turn by turn. One turn of yours takes seconds. Drive it with a program: a controller of your own (Python in your container, with numpy and the client) that runs a loop, reads the robot and sends commands, started in the background (setsid nohup python -u /app/output/gen.py > /app/output/run.log 2>&1 < /dev/null &: setsid matters, a plain nohup ... & is killed when your shell command returns) so that your session is free while it runs.
  • One episode, no reset. spec()["budget"]["reset"] is authoritative: it is 0 here, so the one episode is the run.
  • No privileged state, no score. You see what the robot's three cameras see (RGB, 84×84: head, left_wrist, right_wrist) and its own proprioception (below). Not where any object is now (only the start sentence above), not the success check: the service judges the episode and only tells you that it ended and why (meta["done"], meta["reason"]). spec() gives the robot's facts: the action slots and their bounds, each camera's field of view and its pose at the start.
  • There is nothing to hand in: the service records every control step it ran and grades the episode as it ran. Keep the controller at /app/output/gen.py for the record: save it early and keep it current.
  • Wall-clock budget: the time limit (## Time limit). It ends without warning, and ending your session earlier ends the run the same way (and stops your background programs), so do not stop early.

Success

The episode succeeds when the following has held for 1 s (50 control steps in a row): the three blocks form one stack on the green pad: the lowest touching the pad, each of the others touching the block below it, at least 0.03 m higher and within 0.05 m of it horizontally; no block held by a gripper. Held means that a finger of the gripper touches the object (BiGym's is_gripper_holding_object): an open gripper still resting against it holds it. A block touching the floor ends the episode as a failure. The robot must not fall at any time: a fall (the pelvis tilted more than about 53 degrees from upright, or lower than 0.30 m) makes the episode a failure, but does not end it.

The episode ends when the success has held for 1 s (reason = "success"), on the failure above, when the pelvis gets more than 10 m from the scene's origin, on a simulator error, after 8750 control steps (175 s after its clock started), or when your time is up. That live episode is the verdict.

Time and streaming

  • submit answers at once, with the robot as it is now: the rows you sent have not run yet. They become the plan from control step at (an episode step number; by default the next step), replacing whatever was planned from at on. When the plan runs out, the robot stands still on your last command; a gap you leave with a later at is filled with the plan's last row instead, its walking and turning velocity included. res.meta["control_steps"] is the number of steps run so far, res.meta["proprio"]["now"] the robot's proprioception now, res.meta["plan_end_step"] where the plan now ends.
  • Closed loop: every 0.1-0.2 s send the next 0.1-0.2 s of rows (r.submit("whole_body", A, dt=0.02, cameras=[])), computed from the proprioception the previous call returned, so the plan never runs out between your calls (when it does, the robot stands still). cameras=[] skips the images (the fastest call).
  • Open loop: send up to 10 s of rows at once (dt a multiple of 0.02) and the next chunk before the plan runs out, with at = the step where it should take over; at may be up to spec()["timing"]["max_ahead_steps"] steps ahead.
  • A linear chunk starts its interpolation from the command in force just before at: the row planned for that step, or, once the plan has run out, the standing row the robot holds.
  • A row whose step has already run when the request arrives is dropped (res.meta["late_steps"] counts them). get_obs() reads the robot now; get_obs(seconds=s) (at most 30) waits while s seconds of robot time run and returns what the cameras saw. spec()["timing"] states all this; r.status() shows running and lag_s.

Client (/opt/tools/rcb_client.py, protocol eai-standard/2.3, realtime mode)

Its docstring is the full reference (python -c "import rcb_client; help(rcb_client)"); here the action type is "whole_body" (not the docstring's example name):

call endpoint what it does
r = Robot() connects (http://sim:8000, then http://localhost:8000) and waits until the scene is ready
r.spec() GET /spec the robot's facts: action_types["whole_body"] (layout, lower, upper, units), control_dt (0.02 s), max_control_steps (8750), timing, the cameras, proprio_layout, budget
r.status() GET /status calls, rows, control_steps, done, reason, elapsed_s, running, planned_steps, lag_s
r.submit("whole_body", A, dt=0.02, interpolate="linear", at=None, cameras=None) POST /submit plans A, rows of 21 commands dt seconds apart (a chunk covers at most 10 s), from step at; answers at once; the first one starts the clock
r.get_obs(cameras=None, seconds=0, video="frames") POST /observe the robot now, or what the cameras saw over the next seconds

One call returns at most 3000 images (max_frames_per_call, PROTOCOL §3 "Images per call"). A watch is refused with a 429 while the images in flight (pending watches and answers not read yet) would exceed it or 8 of them are outstanding; a submit or a get_obs() without seconds is never refused for its images: its answer then comes without its frames and meta["frames_skipped"] is set.

Measured here on an otherwise idle host: the simulator spends about 14 ms of each 20 ms control step, so it keeps up with the clock (largest lag seen 0.07 s); get_obs() without seconds answers in about 10 ms. Values outside the bounds are clipped and reported in meta["clipped"], never refused; a malformed request raises ValueError and changes nothing.

Action rows (21 floats, physical units)

slot name bounds meaning at the start
0 vx [-1, 1] walking velocity command, forward (m/s, the robot's frame) 0
1 vy [-1, 1] walking velocity command, to the left (m/s) 0
2 height [0.4, 1] pelvis height command (m) 0.74
3 wz [-1, 1] turning rate command, + turns left (rad/s) 0
4 pitch [-0.2, 0.8] torso lean command, + leans forward (rad) 0
5 left_shoulder_pitch_joint [-3.0892, 2.6704] absolute joint target (rad) 0
6 left_shoulder_roll_joint [-1.5882, 2.2515] absolute joint target (rad) 0
7 left_shoulder_yaw_joint [-2.618, 2.618] absolute joint target (rad) 0
8 left_elbow_joint [-1.0472, 2.0944] absolute joint target (rad) 0
9 left_wrist_roll_joint [-1.9722, 1.9722] absolute joint target (rad) 0
10 left_wrist_pitch_joint [-1.6144, 1.6144] absolute joint target (rad) 0
11 left_wrist_yaw_joint [-1.6144, 1.6144] absolute joint target (rad) 0
12 right_shoulder_pitch_joint [-3.0892, 2.6704] absolute joint target (rad) 0
13 right_shoulder_roll_joint [-1.5882, 2.2515] absolute joint target (rad) 0
14 right_shoulder_yaw_joint [-2.618, 2.618] absolute joint target (rad) 0
15 right_elbow_joint [-1.0472, 2.0944] absolute joint target (rad) 0
16 right_wrist_roll_joint [-1.9722, 1.9722] absolute joint target (rad) 0
17 right_wrist_pitch_joint [-1.6144, 1.6144] absolute joint target (rad) 0
18 right_wrist_yaw_joint [-1.6144, 1.6144] absolute joint target (rad) 0
19 left_gripper [0, 1] 0 open .. 1 closed 0.6
20 right_gripper [0, 1] 0 open .. 1 closed 0.6

right_shoulder_roll_joint's bounds are BiGym's action bounds, not the joint's own range [-2.2515, 1.5882]: a command outside them is clipped.

The last column is the row that stands still at the start. The whole-body controller, as BiGym's own notes for its coding agents describe it: it follows velocity commands with some lag and wobble, so read the pelvis pose and close the loop rather than dead-reckon; a planar speed command below 0.055 m/s means standing still (use 0 or at least 0.06); standing still, the base drifts a few centimetres, and further while the hands push on furniture or the torso leans far (measured here: 0.27 m and 15 degrees with the hands pressing on a cabinet, 0.11 m and 24 degrees from a 0.8 rad lean); heights above about 0.8 m lock the knees (the pelvis stays near 0.78 m); squatting (a lower height) is how the hands reach low objects, and while squatting the controller does not step: walk first, then squat in place. It keeps the robot balanced but does not stop it from walking into things.

spec()["joints"] gives each arm, waist and finger joint's axis, a point on it and its range (the pelvis frame with every joint at 0: spec()["joint_frame"]; the sign convention: spec()["joint_sign"]), spec()["grippers"] the point between each gripper's finger pads on its wrist link, and spec()["cameras"][camera]["mount"] each camera's pose on its link. Keep your own copy of the last row you sent: a row rebuilt from the measured joint angles sits a little below the targets the arms were holding (the servos track with a small error), so holding with it lets the arms sag. The client's docstring explains the protocol with another benchmark's examples (joint_position, bounds [-1, 1], imu, links, depth): for this task spec() is authoritative.

Proprioception

Each row (meta["proprio"]["now"], res.proprio) has, in spec()["proprio_layout"] order: the positions (*_pos) of the 3 waist joints (they show the lean you command), each arm's 7 joints (rad) and its gripper's 2 finger joints (slides, m), and the pelvis (pelvis_x_pos, pelvis_y_pos, pelvis_z_pos in m and pelvis_rz_pos, its heading, in rad: the room's frame, z up, heading 0 along the room's +x axis and counter-clockwise positive): 25 values; then their velocities (*_vel, per second) in the same order; then left_gripper_state and right_gripper_state (0 open .. 1 closed); then the pelvis pose again as the base controller tracks it (pelvis_x, pelvis_y, pelvis_z, pelvis_yaw). This is BiGym's own low-dimensional observation, the one its learned policies receive.

External material

You may install packages you need (pip, apt), and you may read anything installed in your container, the simulator's and this benchmark's own source code included. Please solve the task yourself: do not search the web for, or download, a ready-made solution to it, such as published or reference solutions, recorded demonstrations, or policies trained for it. This is an honour rule; trials are reviewed. The network reaches your model's API and the package registries (PyPI, Debian / Ubuntu archives) only.

Resources

Your container: 4 CPUs, 4 GiB of memory, 1024 processes and threads and 10 GiB of disk (new files under /app, /tmp and /root). Your container has no GPU. The simulator runs in its own container and does not count against these. CPU only slows you down; a process that goes over any other cap can be killed. Usage and caps: /run/rcb-limits/usage.json.

Time limit

You have 3600 seconds to complete this task. Do not cheat by using online solutions or hints specific to this task.

This is wall-clock time from the start of your session; the time you wait for the simulator service counts. When it is up you are stopped without warning and the episode is graded as it stands at that moment. The service's time_left_s counts the same limit from your first request to the service, so it never runs out before your time does: your real time left is time_left_s minus the time you spent before that request. Plan by it. Your session started when you received this task. /run/rcb-limits/usage.json, rewritten every few seconds, gives the time left on this limit (time_left_s) and its end (deadline_utc), counted from a little before your session started, so it never gives you more time than you have: read it (or run date) before you decide that time is short, never guess. Waiting counts too: a tool call that sends input to a process that keeps running (an interactive interpreter, a simulator loop, a server) can wait for the whole wait or yield time you give it even when the answer is printed at once, so give such calls a short wait and poll again if the output is not complete, or run one-shot scripts that exit when they are done. Installing packages is not cheating (## External material above).