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.

9.2 KB
Raw Blame

IKEA MuJoCo · SVALLET work lamp — frozen scene

You control a simulated robot (two 6-DoF ViperX 300 s arms (MuJoCo Menagerie ALOHA), each with its own parallel gripper; plain MuJoCo 3.14.0 on the CPU, float64) via Python. Task: Press the lamp shade's key down into the socket on top of the stand column until the spring jaw snaps over it, then screw the E12 bulb up into the shade's socket until it seats.

Success requirements

  • Both retention joints are connected (shade on the stand, bulb in the shade) and, at the end, each connector is within its gates (axial gap, lateral offset and axis tilt).
  • The stand rests on the bench (vertical contact force above 0.1 N) and is within 3 degrees of its upright start orientation.
  • No robot contact with any lamp part at the end.

The benchmark's terminal rules, the same in every IKEA MuJoCo task, come on top of these requirements. When your rows end: (1) the requirements above hold; (2) the parts are released: no robot link touches any part; (3) every part is at rest: at most 0.01 m/s and 0.05 rad/s; (4) the simulation never broke down: no non-finite state, no MuJoCo BADQACC / BADQPOS / BADQVEL warning, no contact of a part deeper than 10 mm, at any time. The grader then holds your last row for 1.0 s more and requires (1)-(4) again at its end.

The requirements are the scene's own success.py (/opt/ikea/scenes/svallet/success.py); the terminal rules are the tooling's (rcb_ikea.py, Session.final_check()). s.status() checks all of it on the current state ("goal" = success.py, "released", "at_rest", "breakdown", "report" = success.py's details); s.final_check() is the grader's verdict on your rows (the current state, then the 1.0 s hold).

Physics and mechanism

  • Parts move only through contact with the robot, gravity and the scene's own mechanism. The shade's barb cams a spring jaw (a slide joint with a spring, 1200 N/m) open and it snaps back over the barb. The bulb thread (11.9 mm x 1.5 mm right-hand, convex thread pieces) advances only by turning and seats on the socket stop. Retention welds switch on with the current relative pose when the seating gates hold. The prewired cable is not built.
  • Grasps are physical: friction from the finger contacts. Nothing attaches a part to a gripper, and there is no assist.
  • The scene (model, solver settings, mechanism) is frozen. The grader builds its own copy; changing the model or the scene files in your container has no effect on the grade.

This is a fixed scene: the parts and the robot start in the same state at every reset (the scene's keyframe home). You may reset and retry as many times as you want, read any simulator state, and save and restore states. Your deliverable is one replayable trajectory, not a general policy.

Deliverable

Write the final trajectory to /app/output/trajectory.npz with Session.save_trajectory(...) (below). It is replayed open-loop from the same initial state in a fresh process, twice, and scored 1 if both replays pass final_check() (the requirements and the terminal rules at the end of your rows and after the 1.0 s hold) and end in the same state, else 0. Also leave the script that produced it at /app/output/gen.py. Save a real trajectory as soon as practical and keep saving progress; do not stop early.

Tooling (already installed; run python from any directory)

from rcb_ikea import Session
s = Session("svallet")                   # builds the frozen scene /opt/ikea/scenes/svallet (scene.py load())
s.model, s.data                       # the MuJoCo MjModel / MjData (privileged: read anything; mujoco is importable)
s.S                                   # the scene object: s.S.mech (mechanism state), s.S.success(), s.S.task (task.json)
s.actuators                           # the 14 actuator names, in action order
s.step(row)                           # one control tick: data.ctrl[:] = s.applied(row) (ctrlrange + speed rule), 4 physics steps (+ the mechanism)
s.run(rows)                           # several ticks
s.hold_action()                       # the current ctrl row (repeating it holds the targets)
s.status()                            # {'success', 'goal', 'released', 'at_rest', 'breakdown', 'rows', 'state_sha', 'report', ...}
s.final_check()                       # the grader's verdict: status() now and after holding the last row 1.0 s (state restored)
st = s.get_state(); s.set_state(st)   # save / restore: physics, mechanism and monitor state, and the rows recorded so far
s.reset()                             # a fresh build of the scene: exactly the grader's initial state; clears the rows
s.replay(rows)                        # reset, replay open-loop, return final_check()  -> use this to self-check
s.save_trajectory(path="/app/output/trajectory.npz")   # the rows recorded since the last reset (or pass rows)

Scene details: /opt/ikea/scenes/svallet/ (scene.py, task.json, layout.json, success.py, the mechanism modules, scene.xml). There is no planner or skill library: inverse kinematics, grasping, screwing and every other skill are yours to build (MuJoCo's Jacobians, mujoco.mj_jacSite, and saved states make that practical).

CLI equivalent of the grader's replay (one replay): python /opt/tools/rcb_ikea.py replay --task svallet --traj /app/output/trajectory.npz

Conventions

  • Action: one row of 14 actuator controls per control tick, float64: per arm (left_, then right_): waist, shoulder, elbow, forearm_roll, wrist_angle, wrist_rotate = joint position targets (rad; wrist_rotate unlimited), gripper = finger rail position target (0.002 m closed .. 0.037 m open). Out-of-range values are clamped to each actuator's ctrlrange. Speed rule (the robot's real limits; clamp, not fail; rcb_ikea.JOINT_SPEED_LIMITS_RAD_S): each arm joint target moves at most 0.00785397 rad per control tick on every arm joint (3.14159 rad/s, the ViperX 300 s joint velocity limit), from the target applied on the previous tick; a target that asks for more is moved by the limit only (Session.applied(), in s.step and in the grader's replay alike), so a fast row is spread over the ticks after it. A row within the limit (+1e-9) is applied unchanged. The gripper command is not limited. The arms are position servos; the actuators' gains and force limits are in the model.
  • Trajectory file: ctrl (N, 14) float64, substeps = 4, timestep = 0.000625 (what save_trajectory writes). Each row is applied for 4 physics steps of 0.625 ms: a 2.5 ms control tick (400 Hz). At most 449000 rows (1122.5 s of simulated time): the grader refuses a longer trajectory (bad_trajectory), because its replays must fit the verifier's time limit. One control tick takes about 4.4 ms of wall clock here: budget your experiments against the time limit (## Time limit).
  • World frame: MuJoCo's, +z up, metres; quaternions are MuJoCo's WXYZ. Tool frames (sites): left_gripper / right_gripper (between the fingertips).
  • The episode does not end on success: the grader checks once, after your last row and again after the 1.0 s hold. End your rows with the parts released, the arms clear of them and everything at rest.
  • One Session per process (the scene's modules are imported once).

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. 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 10800 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 a simulator takes to start counts. When it is up you are stopped without warning and only what is in /app/output/ at that moment is graded, so save a deliverable as soon as you have one and overwrite it whenever you have a better one. 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).