Timing lab: sensor latency, CAN timing groups and actuator delay
Observation delay, timing skew between CAN timing groups, jitter and actuator delay on one timeline: how old each part of the policy's observation is, and when its command actually takes effect.
What it demonstrates
Observation delay, timing skew between CAN timing groups, jitter and actuator delay on one timeline: how old each part of the policy's observation is, and when its command actually takes effect.
How it works
A joint swings at 2 Hz. At each 50 Hz policy step the observation for each of three CAN timing groups is the joint angle at an earlier time: the read time minus a common latency, minus the group index times a skew, minus a uniform random jitter. The policy in this demo simply commands the angle it observes for group 1.
The command is applied on the first 5 ms physics step at or after the read time plus the actuator delay, then held. The timeline shows the last policy step; the chart shows the true angle, what the policy saw for groups 1 and 3, and the command in effect.
Adjustable parameters
- Sensor + bus latency (0–20 ms)
- Skew between groups (0–5 ms)
- Jitter (0–5 ms)
- Actuator delay (0–20 ms)
- Playback speed
Known limitations
- Menlo documents CAN timing groups 1–3 but not their membership or timing; the 4/4/4 split and every delay value here are illustrative.
- Observations are taken from a continuous signal; a real IO path samples at discrete instants.
Equations
Core update rule
if (runsOnStep(k, 50)) {
const obs = [0, 1, 2].map((g) => q(t - latency - g * skew - jitter * rng()));
pending.push({ step: Math.ceil((t + actDelay) / 0.005), u: obs[0] });
}
while (pending[0]?.step <= k) applied = pending.shift().u;Explained in Chapter 6: Asimov Simulation