tp: apply parabolic half-accel only during an actual blend#4221
Open
grandixximo wants to merge 1 commit into
Open
tp: apply parabolic half-accel only during an actual blend#4221grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
…4220) Lone/first/last non-blending segments now use full path acceleration; the 1/2 reservation is gated on an active parabolic overlap. Updates tests/motion/g0 to expect full accel on a lone rapid.
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.
Fixes #4220.
What
The trajectory planner halves acceleration on segments that never blend (single MDI move, first segment from rest, last segment decelerating to a stop). See #4220 for the full analysis and evidence.
This gates the half reduction on an actual parabolic blend overlap instead of a term-condition flag.
Change
src/emc/tp/tc.c: keeptcGetOverallMaxAccel/tcGetTangentialMaxAccelreduced (used for corner-speed sizing, unchanged). AddtcGetCycleMaxAccel(tc, in_overlap)that applies the half only when the segment overlaps a neighbor in an active blend, otherwise returns the full path acceleration.src/emc/tp/tp.c: thread anin_overlapflag throughtpUpdateCycleand the trapezoidal / ramp / s-curve per-cycle accel functions. Overlap is true for the secondary segment of an active blend and for the primary whileblending_nextis latched; false for lone / first-from-rest / last-to-stop portions and tangent hand-offs.tests/motion/g0: updated to expect full acceleration on a lone rapid (it previously asserted exactly half).Result
The full path acceleration from canon already respects every joint limit for the segment direction, so a single moving segment at full accel violates nothing.
Testing
runtests tests/abort tests/motion tests/lathe: all pass with theg0update. Blend, stop, abort, and lathe behavior is unchanged.