Skip to content

Loop-rate capture with a paced stream, ripple feedforward, settable velocity window - #5

Draft
Jepson2k wants to merge 3 commits into
Source-Robotics:bootloader-versionfrom
Jepson2k:pr/capture-ripple-window
Draft

Jepson2k wants to merge 3 commits into
Source-Robotics:bootloader-versionfrom
Jepson2k:pr/capture-ripple-window

Conversation

@Jepson2k

@Jepson2k Jepson2k commented Oct 3, 2026

Copy link
Copy Markdown

Loop-rate capture with a paced stream, ripple feedforward, settable velocity window

  • Cmd 38/39: up to 1024 samples of the velocity the loop acts on, Iq and electrical phase, one every N loops; a pair or the status per read. Velocity saturates instead of wrapping.
  • Cmd 42/43: the drive streams the whole buffer from loop() at one frame per 320 µs, only into a free mailbox, under its own reply id so it never shares an arbitration id with a host read.
  • Cmd 40: eight slots of a·cos(h·θ)+b·sin(h·θ) mA added to the current setpoint before the clamp (Q15 table, integer math in the interrupt).
  • Cmd 41: speed filter window 4–64 loops (vendor 20); RTR reads it.
  • Capture, ripple and window have run on six drives since 2026-09-27; the ripple feedforward cut speed ripple 3–15× on every joint of a six-axis arm. The stream is new and not yet exercised on hardware. Question for maintainers: reserving command ids 36–43.

Opened by Claude Code on behalf of @Jepson2k.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMGrmJzkcZMnKrjm7HGjv9

Jepson2k and others added 3 commits October 3, 2026 00:57
…elocity window

Cmd 38/39: 1024 samples of velocity, Iq and electrical phase per capture.
Cmd 42/43: the drive streams the buffer from loop() at one frame per 320 us
under its own reply id. Cmd 40: eight ripple feedforward slots added before
the current clamp. Cmd 41: speed filter window 4..64 (vendor 20).

Prepared by Claude Code on behalf of Jepson2k.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMGrmJzkcZMnKrjm7HGjv9
The loop already takes sin and cos of the electrical angle; harmonics up to
RIPPLE_MAX_HARMONIC (16) follow by angle addition in Q15. Capture channel 2
records that same angle so a fit applies as fitted.

Prepared by Claude Code on behalf of Jepson2k.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMGrmJzkcZMnKrjm7HGjv9
Prepared by Claude Code on behalf of Jepson2k.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMGrmJzkcZMnKrjm7HGjv9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant