Views
No views yet
Xia-2004/red_cube, 42,165 frames, 5-DoF).docs/30_red_cube_cv_investigation_and_prism.md.| file | description |
|---|---|
lewm_red_cube_epoch_100_object.ckpt | LeWM world model — pickled JEPA: ViT-tiny encoder + AR transformer predictor + action encoder (~18M params) |
prior_head_red_cube.pt | PRISM goal-conditioned action prior — state_dict + config + action StandardScaler (mean/scale) |
arx_inference_demo.py | self-contained PrismMPPIInference (PoG-fused PRISM-MPPI; use_prism=False → vanilla LeWM-MPPI) |
jepa.py, module.py, prior_head.py | model classes required to unpickle the ckpt and run the prior |
camera_third).[dx, dy, dz, dyaw, d_gripper], raw units, one per
control tick. plan() returns one plan-step = A_block = 5 ticks → shape (5, 5).torch, numpy, einops, and transformers (the encoder inside the ckpt is a HuggingFace
ViT, needed at unpickle time). The three bundled .py files must be importable from the
working directory. (If unpickling complains about a missing class, also pip install stable-pretraining.)1from arx_inference_demo import PrismMPPIInference
2
3planner = PrismMPPIInference(
4 lewm_ckpt = "lewm_red_cube_epoch_100_object.ckpt",
5 prior_ckpt = "prior_head_red_cube.pt",
6 use_prism = True, # True = PRISM (prior ⊗ MPPI via PoG fusion); False = vanilla LeWM-MPPI
7 device = "cuda",
8)
9
10goal_img = load_goal_image() # (224,224,3) uint8 — the task goal image
11while not done:
12 obs = camera.read() # (224,224,3) uint8, top-down camera_third view
13 actions = planner.plan(obs, goal_img) # (5, 5) raw [dx,dy,dz,dyaw,d_gripper]
14 for a in actions: # receding horizon: execute the block, then replan
15 robot.execute(a) # (or execute fewer than 5 and replan more often)plan() runs one full PRISM-MPPI optimization and returns the first A_block = 5 env-step
actions of the optimized plan, in raw action units (already de-normalized).PrismMPPIInference constructor)| arg | default | meaning |
|---|---|---|
H | 5 | planning horizon (plan-steps) |
A_block | 5 | env-steps (ticks) per plan-step ("frameskip") |
K | 128 | MPPI samples per iteration |
n_iters | 30 | MPPI refinement iterations |
var_scale | 1.0 | initial planner sampling std |
prior_sigma_scale | 2.0 | multiplier on the prior σ before PoG fusion (PRISM only) |
temperature | 0.5 | MPPI softmax temperature |
history_size | 3 | LeWM history-window length (must match training) |
H, A_block, A_raw, history_size must match the checkpoints — the constructor asserts
the prior head's config agrees. Change them only if you retrain.use_prism=False for a baseline (plain LeWM-MPPI, no prior,
same encoder/predictor/MPPI loop). On this task PRISM produces more expert-like actions;
vanilla tends to wander because the cost surface is flat.Xia-2004/red_cube (ARX-X5
left-arm teleop). Sibling of Xia-2004/arx-left-cube. World-model architecture is identical
to the sim LeWM (ViT-tiny, embed_dim 192, predictor depth 6 / heads 16) — part of the
PRISM-JEPA project (sister of Newt-PRISM, CoRL 2026).