New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bugfix-1.1.x] COREXY stutter moves (planner.cpp changes) #8697
[bugfix-1.1.x] COREXY stutter moves (planner.cpp changes) #8697
Conversation
removed test statements
This is interesting, and kind of scary… because it looks like it throws away a bunch of carefully-crafted jerk code, and kind of seems like a regression. Has some other firmware taken this approach, and are we sure it's safe compared to all the other possible approaches that could be taken? After all, we've been flirting with possibly using an even fancier jerk method that takes angular change into account… and this PR goes the opposite way, towards what looks like utter simplicity. I want to believe… and merge… but it seems too easy. |
Well, let's loose this thing into the wild and see how it fares… And I'll merge for 2.0.x too. |
WOW!! That was merged a lot faster than I expected. I'm also nervous about going away from the old method. In a simple Cartesian system the amount of energy supplied by the X stepper to make a change in the X direction of the head does not depend on what is happening in the Y or Z directions. I'll need to do some thought experiments before I'm confident in how a CORE system works. Delta math is still a mystery to me. |
If the new Jerk code ends up in 1.1.7 (coming soon!) then we'll need to give it a fast sounding nickname in the release notes. The "Rocky Rakuhn" Jerk Algorithm… |
You're down the rabbit hole now! As you can see the core underlying system of Marlin presumes Cartesian mechanics to a fault. Delta was bolted on by @jcrocholl for the Kossel, and so there is no formal system in place to deal with the linear acceleration of the effector in a Delta or with the rotational degrees-per-second feedrates of a SCARA. So, we continue to apply patches and look for patterns in the chaos. For the most part we keep getting closer, though each problem we tackle ends up having scattered pieces — what with so many different specialized motion functions, and all. The fact that Delta acceleration works is down to the segmentation of moves. Each segment of the move is supposed to take a certain amount of time. So wherever possible, we should apply feed-rates that accomplish the target duration. It might even make sense to start storing and working with feed-rates more explicitly in terms of move duration. Instead of saying "move this fast" tell each move "take this amount of time." All that said, the rates of motion in a Core system —in my view— should be considered in terms of the carriage, with the feedrates reckoned and limited at the So, maybe that means there's a part of the stepper ISR that could be skipped or replaced, if its job is to apply unnecessary limits to ABC that it should be applying to XYZ. Or, maybe that's what it already tries to do…? |
…menr [bugfix-1.1.x] minor planner.cpp speed improvement (follow up to COREXY stutter changes PR #8697)
…rlinFirmware#8697)" This reverts commit 86b65e5.
…rlinFirmware#8697)" This reverts commit 86b65e5.
This is from Issue #8573
In a band of feed rates the CORE machines will have short (10mS – 30mS) pauses.
The root cause is the current code doesn’t apply jerk until the head movement rate exceeds the jerk setting. On a CORE machine one of the steppers is always moving faster than the head. The result is a band of feed rates where the stepper needs jerk but the head rate isn’t yet calling for it.
In that band of feed rates, negative values for block->accelerate_until are fed to the stepper routine. These negative values result in the short pauses of about 10mS - 30mS spaced about 275mS apart..
This update calculates the jerk requirements on a per stepper basis. It also applies the worst case rather than just the one with the maximum configured jerk.
nominal_speed
is now based on maximum stepper speed andstart_speed
is based on the worst case jerk.CPU loading is not affected by the code change. Execution times for
_buffer_steps()
are similar.Execution times are in milliseconds.
The above uses the following gcode program
Build sizes and RAM usage are the same or a little less.
Here's an example of the stuttering when the feed rate is in problem band.
Here are logic analyzer captures of the step pulses. They include new & old software, COREXY & Cartesian and various feedrates. The gcode program is given above. X jerk was set to 20 and Y was set to 10 so that it is possible to see what happens when axis need different accelerations.
The very bottom trace is the time spend in the
_buffer_steps()
routine.You'll need the Saleae software to view them.
stepper captures.zip