Worked example

All worked examples · source: docs/guide/action_chunk.md

Action-chunk latency: a worked example

The Action-chunk latency page (Analysis ▸ Action-chunk latency) says how late or early each of your action-chunked policies closes the gripper on the contact point, and what delay offset and ensemble weight to write into the training config. The model is in docs/models/action_chunk.md.

1. Start from the UR5e sample

  1. File ▸ Open sample ▸ UR5e. It carries the π0 policy (sample choice) and a scripted pick.
  2. Tasks ▸ Policies: add ACT and Diffusion Policy (CNN, real-world setting). Their horizons, executed steps, ensemble weights, inference times and control rates come from the library entries (each figure cited; the ACT entry's m = 0.01 from the official code).
  3. Analysis ▸ Bandwidth: add a host with one USB 3 controller and plug both cameras into it. The transfer time of each camera's frame then comes from that budget (9.5 ms for the D405's 1280 × 720 YUY2 frame, 15.8 ms for the D435's 1920 × 1080).
  4. For this example, remove the scripted pick (Tasks), so the study uses the default approach speed of 0.10 m/s (labelled a default on the page; with the pick in place the hand is still when it closes, and the error at contact is 0 mm).

2. Run it

Open Analysis ▸ Action-chunk latency and press Run (the study is quick and also re-runs after edits).

3. Apply

The recommendations:

Preview draws the overshoot map as it would be after the offset. Apply stores the offsets and m on the three policies (one undo step; Edit ▸ Undo takes it back). The study runs again and reads them as the policies' configured values: the headline drops to 15.0 mm (Diffusion Policy, now "closes early" by up to 15 mm, "serious"). Export… writes the result with provenance.

In batch:

dexvantage --sample ur5e --action-chunk chunk.json

A policy whose inference time or control rate no source states is left out with a sentence (the SO-100 sample's SmolVLA: "its inference time is not stated by its source"); with no usable policy the run exits 2 with that sentence.