Repository navigation
docs: correct the enable() lag figures and the 10 ms advice - #24
Merged
Merged
Conversation
The 7.0-7.8 ms figure for get_state().enabled to turn true after enable() does not reproduce. Re-measured on the same unit: return at 2.0-3.1 ms, flag true at 17.6-48.5 ms (n=11, cold start and after disable alike). The earlier run read 7.0-7.8 ms, so the lag is state-dependent -- but it is always several status frames, never one. That also makes the "wait a frame (or ~10 ms)" advice wrong: 10 ms is shorter than the longest observed lag, so following it still reads a stale False. Every site now says to poll until the flag flips. disable() does not share the problem: return at 2.9-3.1 ms against 3.0-3.1 ms for enabled to read False. A single immediate read can still return the frame from before the command, which is what made it look like the same defect in the first place. Docstring and documentation only, no behaviour change.
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
Corrects the
enable()latency figures this repository published in #23. Those numbers donot reproduce, and the advice built on them — "wait a frame (or ~10 ms)" — is too short to
be safe.
Re-measured on the same arm (LiteArm 7-DOF,
Litearm1.10.0-7J):enable()returnsget_state().enabledturns trueAn earlier run on the same unit did read 7.0-7.8 ms, so the lag is state-dependent. The
important half of #23 is unaffected and in fact stronger: a single read right after
enable()is always stale.What changes is the prescription. 10 ms is shorter than the longest observed lag
(48.5 ms), so "wait a frame, then read" still returns a stale
False. Every site nowsays to poll until the flag flips.
disable()was checked at the same time and does not share the problem: it returns at2.9-3.1 ms against 3.0-3.1 ms for
enabledto readFalse. A single immediate read canstill return the frame from before the command — that is what made it look like the same
defect in the first place.
Changes
src/litearm/arm.py—enable()docstring: corrected figures; the advice is now to polluntil the flag flips rather than to wait ~10 ms.
README.md,README.zh-CN.md— the same correction in the quick start section.docs/DEVELOPER_GUIDE.md,docs/DEVELOPER_GUIDE.zh-CN.md— §5.1: corrected figures, andthe
disable()row now records that it has no long lag.Documentation and one docstring. No behaviour change.
Testing
The measurement itself was taken on hardware, in both conditions — the first
enable()after connecting, and
enable()after adisable()— so the figure is not an artefact of acold start:
Issues
None — found while re-verifying these figures for a hardware test report. No tracking issue.