Repository navigation
Conversation
Integrate latest-only scheduling, lifecycle commands, PCHIP endpoint holding, duration-based blending of unsent control points, and Q=0.5 filtering on mainline 5306d47. Preserve the current single-point behavior and compact helper tests. Consolidate usage, metadata, migration notes and known limitations in README. The version with the full document is preserved on backup/executor-control-rate-099158a.
Contributor
Author
Feature summary relative to mainThis summary compares base commit
|
Report matching adoption, completion, and rejection feedback through execution_plan. Complete only after both arms receive the final command, while preserving cancellation and legacy asynchronous/RTC behavior. Validation: 167 CPU regression tests passed across the executor, policy bridge, and shared runtime.
Scale action intervals while preserving the first target and takeover time. Report effective timing in execution plans and account for scaled completion. Validation: executor CPU tests passed as part of the 221-test node/runtime suite.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add preemptible, latest-only action execution with control-rate trajectory handoff, shape-preserving PCHIP interpolation, duration-based blending, and chunk provenance metadata.
The PR keeps concise usage, configuration, metadata, migration notes, and limitations in README.
Execution changes
Latest-only scheduling and lifecycle
asyncio.to_thread(node.next)instead of the previous 100 ms idle polling loop.startenables output;stop,intervene, andquitdisable output and clear pending actions, trajectory, filter, and provenance state.Upsample first, then blend unsent control points
The trajectory path is:
On interruption, the executor retains the old trajectory's unsent, not-yet-filtered points. It does not prepend the last published command or reconstruct a policy-rate remainder. Each new chunk is interpolated independently using its own length and interval before mixing the two buffers. Filtering runs once per emitted point, retaining state across ordinary handoffs; reset discards the old remainder and resets filter state.
PCHIP and endpoint coverage
SciPy PCHIP replaces the handwritten Hermite slope calculation, which could reverse or overshoot even on monotone input near the first/last segment. PCHIP preserves per-joint shape without forcing every chunk's endpoint velocities to zero.
Integer-nanosecond timing constructs a fixed-period output grid that reaches or passes the horizon. Evaluation times are clamped to the horizon and the final pose is copied exactly; no extrapolation or shortened final control period is used. A single-point chunk passes through the interpolation stage unchanged. SciPy is added as a package dependency.
These are interpolation properties, not guarantees about the later blend/filter result or physical robot motion.
Time-based blending and filter damping
--blend-duration-ms/ACTION_BLEND_DURATION_MSspecifies a target transition duration. For example, 100 ms at 250 Hz uses 26 points including both endpoints when enough overlap is available.0disables explicit blending, not filtering. Durations round up to an execution period and are clipped by available overlap.Q=0.707toQ=0.5, reducing ringing at the cost of a slower response at the same frequency parameter. The defaultcutoff_hzremains 15 Hz; filter placement and state management are unchanged.Interface and migration
Canonical per-arm
struct<qpos: list<float32>>outputs remain unchanged. Actions remain a[T, D]Arrow list array, with requiredintervalmetadata in nanoseconds and optionalcutoff_hz,reset, andchunk_id.Upstream users must wire the new behavioral
commandrequirement and send Start before actions can execute.--upsampleand--filterremain opt-in;--control-hzdefaults to 250 Hz when upsampling.For users of the earlier feature branch, the point-count options
--blend-max-steps/ACTION_BLEND_MAX_STEPSare removed. Their approximate time-span replacement is(N - 1) * policy_interval; four policy points at 30 Hz correspond to about 100 ms. Numerical behavior still changes because blending now follows interpolation.Provenance
Outputs always carry a publication
timestamp. When an input haschunk_id, output metadata also includes its ID, executor receive time, and nominalblend_duration_ns.blended_chunk_ididentifies the immediately preceding chunk during the explicit transition window, including the endpoint whose old weight is zero.The legacy
blend_policy_pointsfield remains a rounded policy-span equivalent for existing recorders. It is not the count of mixed control samples. Recorders need a separate schema update to persistblend_duration_ns; this PR does not change recorder code. Arbitrary policy metadata is not forwarded automatically, and provenance is not a complete blend lineage or proof that the driver accepted the command.Known limitations retained intentionally
Validation
Q=0.5, versus about 4.57% for the former default. This is a synthetic filter test, not a hardware benchmark or equal-bandwidth comparison.No robot hardware or full Dora/model inference pipeline was run for these changes.