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.

8.6 KB
Raw Blame

MyoSuite · baoding — STANDARD MODE (robot as a service, eai-standard/2.2)

You control the MyoHand, a musculoskeletal model of a human forearm and hand, as if it were real: the simulator (MyoSuite 2.12.2 on MuJoCo) runs in a service you cannot open. You get one client and up to 11 episodes, and you act only through its actuators (39 muscles). Task: Baoding balls: rotate the two balls around each other in the palm so that each follows its moving target (the targets circle the palm once every 5 s). Success: both balls within 0.015 m of their targets for 200 consecutive control steps (5.0 s: one full orbit of the targets). Failure (the episode ends): a ball's height (world z) drops below 1.25 m, i.e. it falls out of the palm. MyoSuite's target trajectory has 1000 points: an episode that has not succeeded after 1000 control steps (25 s) ends there, as a failure.

Two balls rest in the palm of the upturned hand; two small markers show where each ball should be now.

Rules

  • Episodes and resets. The episode starts when the service comes up and ends on success (the goal held 200 control steps, 5.0 s), on the task's failure, when your time is up, or on a simulator error. You have 10 resets (spec["budget"]["reset"], which is authoritative: if it says 0, there is no reset and the one episode is the run). A reset (POST /reset, below) puts the body and the scene back on the same frozen starting state and starts a new episode, either abandoning the running one or after one has ended; it takes no simulated time and returns the start's images and proprioception. Once an episode has ended, submit raises EpisodeOver until you reset. Only the last episode is graded: an episode you reset away is never graded, a success ends the run at once (no reset after it), and when your time is up the episode then running is the one graded. The wall clock is the run's and never restarts; meta["episode"] and meta["resets_left"] count the episodes (meta["control_steps"] is the current episode's).
  • No privileged state. You see what the cameras see (RGB, and depth on request, with each camera's calibration) and the body's own proprioception: joint positions, velocities and actuator torques, muscle activations and lengths. No object, ball, opponent or goal poses, no success check: meta["done"] / meta["reason"] tell you when the episode is over and why.
  • Steps are unlimited; your only budget is the time limit (## Time limit; meta["time_left_s"] is the service's count of it). Simulated time only advances with your commands (and get_obs(seconds=...), which holds the last command). Do not stop early: while the episode runs, or a reset is left, the run can still pass.
  • Nothing to hand in: the service records your episode and grades it. Leave your script at /app/output/gen.py.
  • If the service crashes, a call fails with a connection error: it restarts and resumes the SAME episode (never a reset) in the state after the last call it completed. r.wait_ready() waits for it; then check r.status().
  • Nothing is put into your context automatically. Images and videos come back as arrays/bytes in a Python object.

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

from rcb_client import Robot
r = Robot()                                    # connects (waits while the service starts)
spec = r.spec()                                # actuators, joints, cameras (+ intrinsics, mounting), proprio layout, kinematics, budget
obs = r.get_obs()                              # obs.last[cam] -> uint8 (480, 640, 3) (default camera: hand_top)
obs = r.get_obs(cameras=["side_view"], depth=True)   # + obs.last_depth[cam] -> float32 (480, 640), metres
obs.meta["proprio"]                            # {"layout": [...], "now": [...]}: q_*, qd_*, act_*, len_*, effort_*
obs.meta["cameras"]                            # per camera intrinsic_cv / extrinsic_cv / cam2world_gl at the last frame
res = r.submit("muscle", rows, dt=0.025)          # rows: (T, 39) commands, one row per control step
res.meta["done"], res.meta["reason"], res.meta["control_steps_chunk"]; res.video[cam]; res.last[cam]; res.proprio
obs = r.get_obs(seconds=1.0, video="mp4")      # hold the last command and watch for 1 s (max 30)
r.fk(q)                                        # forward kinematics of the listed links (no physics)
r.status()                                     # calls, control steps, done, reason, elapsed time, episode, resets_left
obs = r._post("/reset", {"cameras": ["side_view"]}, [], 900)   # POST /reset: a new episode (the 2.2 client has no reset())

Cameras: side_view, front_view, hand_top, hand_bottom, hand_side_inter, hand_side_exter, plam_lookat (640x480; default hand_top). hand_top and hand_side_inter are close-ups of the hand, mounted on the forearm (the radius): they move with it (pronation turns them), so use the pose returned with each frame; spec["cameras"] gives each camera's mounting (static, fixed to a body, or a MuJoCo tracking camera that follows one) and intrinsics, and every response carries each frame's pose. Rendering is on the CPU: ask only for the cameras you need; video="none" makes a chunk fastest. One call returns at most 1000 images (max_frames_per_call, PROTOCOL §3 "Images per call"). Proprioception (spec["proprio_groups"]): joint_pos (q_<joint>), joint_vel (qd_<joint>), muscle_activation (act_<muscle>), muscle_length (len_<muscle>, m), joint_effort (effort_<joint>, the actuators' generalized force on each joint). /kinematics gives the fingertip sites and the camera mounts for any joint positions.

Action type muscle (39)

39 real numbers per control step, one per actuator in order: 39 muscles. A muscle's command a maps to its excitation u = 1 / (1 + exp(-5 (a - 0.5))) and is not clipped (a = -1: u ~ 0.0006, a = 0.5: 0.5, a = 1: 0.92, a = 2: 0.9994); activation follows excitation with a first-order delay (~10 ms up, ~40 ms down); muscles only pull; one muscle can cross several joints; its force also depends on its length and velocity. Columns in spec["action_types"]["muscle"]["layout"] order. Rows are dt apart (a whole multiple of the 25 ms control period, at most 0.5 s; a chunk covers at most 10 s), interpolate="linear" (default, from the previous command) or "hold"; the client sends them as float32. The control rate is 40 Hz (10 physics substeps); there is no step budget.

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, 7 GiB of memory, 2048 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).