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.

6.7 KB
Raw Blame

MetaWorld+ · peg-insert-side — STANDARD MODE (robot as a service)

A Sawyer arm stands at a table: Meta-World's peg-insert-side-v3 environment (MuJoCo). Task: Insert the peg into the side-facing socket. The scene is one frozen instance of Meta-World's own randomization.

You control the robot as if it were real hardware: the simulator runs in a service you cannot open. You get one client and one episode.

Rules (real-robot rules)

  • No reset. What you knock over stays knocked over.
  • No privileged state. You see what the cameras see (RGB, optional depth, with each camera's calibration), the robot's own state and the task's target point. No object poses, no success signal.
  • Your only budget is the time limit (## Time limit). meta["time_left_s"] is the service's count of it, from your first request to the service: it never runs out before your time does, so plan by it. There is nothing to hand in: the service records the episode as the trajectory and grades it. Leave your script at /app/output/gen.py for the record.
  • Do not use Meta-World's scripted policies or any published solution for this benchmark; write your own controller.
  • Images come back as arrays in a Python object; what you look at and where you store it is up to your code.

Scoring

The episode runs until your time is up. The service then applies Meta-World's own success check for peg-insert-side-v3 to the live episode's state after the last executed control step. A success reached earlier and then lost does not count: end in the state you want graded and stop submitting.

For peg-insert-side-v3 the check is: The peg's head is within 7 cm of the target point, with the y and z differences counted double. ("The target point" is meta["task"]["target_pos"]; everything the check needs to hold must hold in that final state.)

Client (/opt/tools/rcb_client.py, protocol eai-standard/2.1)

from rcb_client import Robot
r = Robot()                                   # connects (waits while the service starts)
spec = r.spec()                               # control_dt, action layout + limits, cameras, proprio layout, budget
cams = list(spec["cameras"])                  # front, left, right, topview
obs = r.get_obs(cameras=cams, include_depth=True)   # obs.last[cam] -> uint8 (240, 320, 3); obs.depth[cam] -> metres
obs.meta["proprio"]                           # {"layout": [...], "now": [...]}
obs.meta["cameras"]                           # per camera: intrinsic_cv, cam2world_gl (OpenGL: looks along -z)
obs.meta["task"]["target_pos"]                # the task's target point (world frame)
obs = r.get_obs(cameras=cams[:1], seconds=2.0, video="mp4")    # hold still and watch for 2 s (max 30)
res = r.submit("ee_delta", A, dt=spec["control_dt"], cameras=cams[:1], video="mp4")   # A: (T, 4)
res.meta["done"], res.meta["reason"], res.meta["control_steps"]
res.video[cam]; res.frames[cam]; res.last[cam]; res.proprio; res.save("/app/runs/003")
  • Action ee_delta (4: dx, dy, dz, grip, float64, each clipped to [-1, 1]) is Meta-World's native action, applied once per control step (control_dt = 0.0125 s). The hand's target moves by [dx, dy, dz] × 1 cm per control step and stays inside x ∈ [-0.5, 0.5], y ∈ [0.4, 1], z ∈ [0.05, 0.5]; the hand follows it. grip drives the two fingers (+1 closes, -1 opens). The wrist does not rotate. Rows are dt apart (a multiple of control_dt); with dt = control_dt each row is one native action. A chunk covers at most 10 s.
  • get_obs(seconds=s) holds the hand still (zero motion, same grip) while physics runs for s seconds; those control steps are part of the episode.
  • Proprioception (meta["proprio"]["layout"]): tcp_x/y/z (the point between the fingertips), gripper_opening (0 closed … 1 open), mocap_x/y/z (the hand's target), the arm joints' positions and velocities, the finger joints' positions, and cmd_* (the last action).
  • World frame: metres; x to the robot's right, y forward (away from the robot's base), z up; the table top is at z = 0. Quaternions are w x y z. The four cameras are fixed.
  • Calibration: meta["cameras"][cam] holds intrinsic_cv (pinhole, pixels) and cam2world_gl (4x4 camera-to-world, OpenGL axes: x right, y up, the camera looks along -z; the viewpoint the image is rendered from). Depth is the distance along the viewing axis, in metres.

One call returns at most 3000 images (max_frames_per_call, PROTOCOL §3 "Images per call").

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: 2 CPUs, 5 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 1800 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).