Repository navigation
Conversation
Issue #44 asks for a collect -> inverse dynamics -> error visualization pipeline that judges how accurate the firmware's current-loop torque estimate is. tools/tau_eval records every q/dq/tau status frame, replays the firmware's world-frame RNEA over it, and writes per-joint metrics, SVG figures and a Markdown report. - three scenarios: a watchdog-fed static hold, a low-speed sine and slow multi-pose moves streamed as smoothstep move_js references; - stdlib-only analysis: zero-phase Butterworth filters, central-difference ddq, uniform resampling, pure-SVG plotting, no numpy/matplotlib; - diagnostics separate gravity/bias, friction, inertia and delay evidence and print concrete next steps; - every option and the model snapshot are persisted, so an analysis can be reproduced offline with `run.py analyze <dir>`; - examples/make_synthetic.py runs the whole pipeline without hardware. Refs #44
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
Adds
tools/tau_eval, a pipeline implementing issue nexform-tech/litearm-benchmark#1: record everyq/dq/taustatus frame from the arm, replay the firmware's world-frame rigid-body inverse dynamics (RNEA) over it, and report how large the current-loop torque estimate's error is — with per-joint metrics, SVG figures, a Markdown report and error-source attribution.tauis the motor's current-derived torque (p->tor × directionfrom the DM feedback frame), so the reported residual is the composite error of the current loop plus the model. It cannot be split into calibration vs. model error without a torque sensor or raw phase current; the report states this limitation explicitly.Changes
tools/tau_eval/: stdlib-only package (Python 3.9+) withcli.py,collect.py,analyze.py,model.py,rnea.py,filters.py,plots.py,report.pyandrun.py; no numpy/matplotlib, figures are plain SVG.dq, and slow multi-pose moves streamed as smoothstepmove_jsreferences (avoidsmovejarrival timeouts on a bench whose gravity vector differs from the firmware default).q/dqandtau, central-differenceddq, RNEA, edge trim; every option and the model snapshot are persisted for offline reproduction viarun.py analyze <dir>.tools/tau_eval/examples/make_synthetic.pyruns collect → analyze → plot → report without hardware.tests/test_tau_eval.py: firmware gravity golden probe, mass-matrix/RNEA consistency, filter/resampling properties, CSV round-trip, soft-limit validation, and a synthetic end-to-end run that also asserts the time series spans the full plot area.runs/is added to.gitignore; generated artifacts are never committed.Testing
python3 -m pytest -q→ 744 passed, 22 skipped (includes the 11 new tau_eval tests).Litearm1.10.0-7J, bench gravity +Y,--gravity 0,9.81,0): all three scenarios recorded withflags=0x2C0(enabled, MOVE_JS, no fault, no watchdog trip); mean RMSE hold 0.48, sine 0.36, poses 0.45 N·m.Issues
Refs nexform-tech/litearm-benchmark#1