1 kHz C99 CBF-QP wall-clock latency cohorts and quintic C² action-chunk jerk suppression

Bridging 10 Hz Neural Action Chunks to a 1 kHz Joint Servo

Connecting a 10 Hz visuomotor diffusion or flow policy to a 1 kHz (1 ms cycle) 7-DoF torque/position servo exposes two low-level hazards:

  1. Whole-arm link collisions: elbow links sweeping near fixtures must be deflected inside the 1 ms servo budget using nullspace redundancy;
  2. Chunk-boundary jerk spikes: asynchronously switching to a newly arrived 16-step action chunk every 100 ms creates velocity and acceleration steps that excite structural resonance.

We implemented both layers in standalone FP64 screw kinematics and prepared C99 kernels, benchmarking each independently on an Intel Core i5-12400F (single-threaded FP64).

65.2 µs Velocity-Level Capsule CBF-QP

Modeling arm links and scene pillars as swept capsules with exact surface clearance h(q)=dsurf(q)−dmin⁡h(q) = d_{\text{surf}}(q) - d_{\min}, the velocity-level IK QP enforces first-order Control Barrier Function constraints alongside joint position and velocity bounds:

∇qh(q)⊤q˙≥−γ h(q)\nabla_q h(q)^\top \dot{q} \ge -\gamma\, h(q)
  • Nullspace self-motion: locking the 6-DoF end-effector flange while pushing the elbow away from a nearby post displaced the elbow by 85.1 mm with only 0.01045 mm max flange drift;
  • Two-pillar S-curve traversal (801 ticks): unconstrained damped least squares (DLS) violated the 14 mm safety buffer on 285 ticks, whereas CBF-QP held exact 14.00 mm minimum clearance throughout (7.33 mm max flange tracking relaxation at the tightest pinch);
  • Single-step CPU wall time (including full PoE forward kinematics, all capsule-pair distance gradients, and active-set QP solve):
Benchmark Cohort (i5-12400F · 1T FP64 C99) Sample Count Median / P99 Latency Ticks ≥1 ms\ge 1\text{ ms}
Shuffled paired state sweep 192 states × 4 passes = 768 calls 65.2 µs / 194.4 µs 0
Continuous 1 kHz closed-loop rollout 3,200 consecutive ticks (3.2 s) P99 166.6 µs (max 672.3 µs) 0

(For comparison, assembling matrices in Python per step yielded a 2,179.1 µs P99—pre-binding scene geometry in C99 compressed tail latency by over 10×.)

Quintic C2C^2 Chunk Takeover: Cutting Peak Jerk from 8,204 to 44.5 rad/s³

When a new 10 Hz action chunk arrives asynchronously, our stitcher matches the outgoing trajectory’s exact position, velocity, and acceleration at the scheduled takeover tick tst_s:

q+(ts)=q−(ts),q˙+(ts)=q˙−(ts),q¨+(ts)=q¨−(ts)q^+(t_s) = q^-(t_s), \qquad \dot{q}^+(t_s) = \dot{q}^-(t_s), \qquad \ddot{q}^+(t_s) = \ddot{q}^-(t_s)

while dilating horizon duration as needed to respect a 72 rad/s³ command jerk budget (discarding stale late packets). Across a 4-second, 40-replan bounded PD+feedforward servo replay (measuring realized plant jerk via 1 ms backward differences of joint acceleration):

  • Naive chunk switching: 8,203.64 rad/s³ peak jerk (47.2% of ticks exceeding 80 rad/s³);
  • Quintic C2C^2 takeover: 44.50 rad/s³ peak jerk (184× reduction, 0% of ticks above 80 rad/s³), trading 25.30 mm RMS deviation against the discontinuous raw policy targets.

Measured datasets: 768-call paired timing log · 3,200-tick 1 kHz trace · Two-pillar avoidance summary · Nullspace elbow self-motion · C2C^2 takeover replay metrics