-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
[BUG] JUNCTION_DEVIATION creates unexpected decelerations/accelerations on smooth curves #17342
Comments
Have the same issue. |
Yes. I have this same problem (in fact also printing face shields :D). Differences in setup, producing the same issue:
Similarities:
More parameters:
I'm considering switching back permanently to classic jerk since it doesn't have this problem. Your help would be very appreciated! Maybe related: #15473 |
Because of this problem, I spent a lot of time testing JD and LA settings. My bottom line is to set JD much higher, certainly based on my other settings. Printing curves like @ktand in the first post with default 0.013 JD creates a lot of stuttering on my machine. Increasing JD to much higher values makes it working as expected. In my case setting JD to 0.07 stuttering gets rarely. Increasing to 0.09 makes stuttering almost gone, except small curves and corners where it does its job as expected. Here are my config files, maybe to compare settings like acceleration, E-jerk,... |
I increased JUNCTION_DEVIATION_MM to 0.2, almost 11 times higher, but the
problem still occurs.
Den tis 31 mars 2020 kl 19:43 skrev rado79 <[email protected]>:
… Because of this problem, I spent a lot of time testing JD and LA settings.
My bottom line is to set JD much higher, certainly based on my other
settings. Printing curves like @ktand <https://github.com/ktand> in the
first post with default 0.013 JD creates a lot of stuttering on my machine.
Increasing JD to much higher values makes it working as expected. In my
case setting JD to 0.07 stuttering gets rarely. Increasing to 0.09 makes
stuttering almost gone, except small curves and corners where it does its
job as expected.
Here are my config files, maybe to compare settings like acceleration,
E-jerk,...
Configuration.zip
<https://github.com/MarlinFirmware/Marlin/files/4410644/Configuration.zip>
Configuration_adv.zip
<https://github.com/MarlinFirmware/Marlin/files/4410645/Configuration_adv.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17342 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEHQ2JDBQG34PUYSMZVYDKTRKITSLANCNFSM4LW33CGA>
.
|
I increased it to 0.3mm and the problem still occurs.
El mar., 31 mar. 2020 19:56, Karl Andersson <[email protected]>
escribió:
… I increased JUNCTION_DEVIATION_MM to 0.2, almost 11 times higher, but the
problem still occurs.
Den tis 31 mars 2020 kl 19:43 skrev rado79 ***@***.***>:
> Because of this problem, I spent a lot of time testing JD and LA
settings.
> My bottom line is to set JD much higher, certainly based on my other
> settings. Printing curves like @ktand <https://github.com/ktand> in the
> first post with default 0.013 JD creates a lot of stuttering on my
machine.
> Increasing JD to much higher values makes it working as expected. In my
> case setting JD to 0.07 stuttering gets rarely. Increasing to 0.09 makes
> stuttering almost gone, except small curves and corners where it does its
> job as expected.
>
> Here are my config files, maybe to compare settings like acceleration,
> E-jerk,...
> Configuration.zip
> <
https://github.com/MarlinFirmware/Marlin/files/4410644/Configuration.zip>
> Configuration_adv.zip
> <
https://github.com/MarlinFirmware/Marlin/files/4410645/Configuration_adv.zip
>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#17342 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AEHQ2JDBQG34PUYSMZVYDKTRKITSLANCNFSM4LW33CGA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17342 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPPKS64M6XGUXUT6YIQNLRKIVEDANCNFSM4LW33CGA>
.
|
First, be sure to turn off all acceleration and speed tuning in your slicer. Prusa Slicer and Cura are both prone to inserting a lot of parameter changes, and this can sometimes interfere with the planner. Unfortunately it is not a simple thing to debug dynamic issues of this kind without lots of data collection and isolation of effects. So we will need to gather as much logging as possible to determine root causes. One thing I would note is that when doing curves you are likely to get a greater variation in linear speeds and constraints on those speeds. If you have your movement speed set very high in the slicer so you can get fast curves, you will also get a lot of places where your printer's maximum constraints come into play to alter the speed. So, you can try setting very high max-accel and max-speed values on the printer to remove those constraints. Curves with lots of segments are also a bit more demanding, so you may also be hitting computation limits in some cases, and slowing down of the planner to keep the buffer full. If your board has lots of SRAM you can increase the buffer sizes and set the slowdown limit to a smaller proportion. We did just fix an issue with G2/G3 arcs, but your slicer probably isn't producing those…. |
One of the settings I saw CH3D point out recently was the "minimum segment length" setting in the slicer. This makes sure not to flood the machine with too many tiny segments, when a minimum length of 0.6mm would do just fine for most applications. I don't mean to suggest that tuning slicer settings and reducing load on the machine is the ultimate solution for JD (and LA) issues, but it will help in the isolation testing. |
These are the acceleration parameters currently set in the slicer. I will set them to 0 so that the printer defaults are used (I will also reset the printer configuration to ensure no parameters has changed) and try another print. Regarding the slowing down I've tried the following:
I'm printing from SD. Is there a different how the planner treats segments with JD vs classic jerk enabled, except from generating segments with different acceleration/deceleration? With classic jerk the print is very smooth. Tried to find a setting regarding minimum segment length but the only settings that I could find are these: |
Remember to increase the |
I tried without |
There is a difference in how much acceleration and deceleration are applied at the segment junctions. And there are more (expensive) calculations done at each segment junction. Ideally, we'll need to put together a table / graph of the speeds that are being applied at the junctions, comparing classic jerk to junction deviation, and both of those to the best desired speeds. |
Hi! Thanks for looking in to this! Is JD applied to each new motion regardless of length? |
Yes. |
OK, thanks. (I didn't put those icons.. new bug report? :p) |
@ktand Where did you found it? Is it PrusaSlicer? Can't find it on 2.2 |
Since this has become a duplicate of 17146 I am closing that issue to reduce noise. |
@thinkyhead see my comment on the duplicate issue: #17146 (comment). Sloppy/low-res slicing is not a solution; it breaks other things. |
@qwewer0 I'm using Slic3r++ 2.2.48 |
I was in the middle of writing a reply in the other report when @thinkyhead closed it so I'm just copying what I had started to type over there. It's a good idea to consolidate it to one thread anyways. @swilkens wrote
My board is an SKR E3 DIP but that's basically the "same" as the mini I think. I do still have my original creality board but that is different stepper drivers(A4988). This weekend I could try swapping it back in just to test but I'm not sure if I could enable everything without running out of memory on it. Probably not, but i can try. @CarlosGS @qwewer0 @ktand @rado79 and any others I may have missed. Out of curiosity what stepper drivers and exact main board is everyone using. SKR E3 DIP v1.1 and all 4 stepper drivers are TMC2209's on my printer. Like @thinkyhead said we need to start collecting data and logging. To try and get it as consistent across the board we should all decide on or make a fairly quick printing test model that we can all use and a list of what data we should all collect. I'm probably not the best to make those decisions but if someone writes out an almost step by step and what data points to record I'll certainly do it. It looks like M928 can produce a log of "console and host input" and send it to the SDcard to easily grab. Is that the kind of logging you are talking about @thinkyhead? Also what M111 level would be helpful for this? |
Hi! I don't know if this help, but I'm having same problems. CJ is better but I got unexpected beheaviour on some parts. Two videos: Junction Deviation 0.013
GT2560 Motherboard with mega1280. All stepper drivers are TMC2208 as standalone.
|
BQ Zum Mega 3D with integrated DRV8825 drivers |
I have now configured the slicer to use the same defaults as the printer's. Unfortunately this didn't help.
Start of G-code script:
Inspecting the G-code file in S3D shows no speed changes in the critical areas. (Not sure I would be able to seem them if there were any though). Regarding your suggestion:
what would be suitable values for max-accel? And for me to be sure I make the right modification, is it the |
I have noticed this behavior but I had assumed this was a buffer |
Segmenting is going to be different when using ArcWelder comapred to the "default" GCode generated by the slicer. I would expect the result to at least look different from the regular print - could be worse, but could also be much better. As far as I know this hasn't been tested and published. In any case, it would be workaround and not a fix. Feel free to check it and please let us know about the results! :) |
Now the printer "chops" the travel moves (?) wile going up on the mesh level fade out. Like it is dividing it in 2 or more movements. This didn't happen before. After the fade (1mm) it travels in one movement segment again. |
I observed the same problems on fb9502e (origin/bugfix-2.0.x), stuttering on curved surfaces using gcode sliced by Cura. It was "solved" by using ArcWelder, and came back every time I did not use ArcWelder, on various models. It was solved completely by commenting out |
Using a Creality CR-10 S5 with v2.2 silent board, TMC2208_STANDALONE, Linear Advance Disabled, Bugfix 2.0.9.1 (july). I had this problem as well and disabling linear advance (because its not compatible with my board anyway) helped a lot. I always have arc-welder on, and leave accel/jerk off in cura, and just use the printer defaults (that i set) from EEPROM. Even with Linear Advance enabled but set to K0 i still saw this effect. It's really obvious if you just print a test cylinder shape from the cura test shapes extension (40mmx10mm). Based on the above I have now commented out JD_HANDLE_SMALL_SEGMENTS, and increased SLOWDOWN_DIVISOR from 2 to 4. I will report back my findings and I hope to see this get resolved. |
I know this issue is pretty old now, but I figured I should add my remarks since it's still relevant... I've been working on a redesign/rebuild of my larger printer, and it kept having stuttering problems going around curves, like the bow of a Benchy. Couldn't figure it out initially, then found this issue. Commenting-out For comparison, my smaller machine runs (oh, and github-actions bot can go jump in a lake 😛 ) |
My issue also went way when I disabled that setting... |
MarlinFirmware#17342 (comment) suggests a value of 16 when BLOCK_BUFFER_SIZE is 64, but for now I'm being conservative with and going 2 * 4 = 8 to match the BLOCK_BUFFER_SIZE increase of 16 * 4 = 64.
Just to satisfy the bot, and as a follow-up..... I ran into this issue again when I upgraded my printer's firmware recently (to v2.0.9.3 stable, so no longer on the Once I had the tweaked the buffer settings in place along with disabling small segment handling, the stutter disappeared. So this issue can't be closed just yet, I guess. [1] I had to apply my configs by hand this time around, due to too much divergence. Always an error-prone process, I guess. |
I have been having similar behaviour and have identified a cause. It cannot explain the OP's problem because it was introduced in #22599 in August 2021. But it might explain the problems others have subsequently reported. I will submit a PR. The cause in my case, in case you want to know, is that the arc code can inject very short segments at the end of an arc since #22599. These then get aliased when converted to steps in the planner and that can make the segment look like it has a larger angle from the previous segment than it really has. Then the subsection of JD that kicks in for small segments sees a relatively large angle with a relatively short segment, concludes that a very small circle is being drawn and limits the cornering speed accordingly. |
…the remainder through all segments MarlinFirmware#17342
Anyone fancy testing to see whether #24362 helps you? |
Thanks for bringing this up. It may help some users affected by that bug. In general, the issue discussed here, is much older than the If there was an |
Ah, it's a case of confirmation bias. I saw "curve" and "stutter" and identified this with my problem with arc support. However the underlying cause of stuttering in junction deviation may be the same. That is, with very short segments JD is affected by aliasing and gets the angle calculations wrong. Possibly JD should use |
I would like to continue to analyze this issue and find a good methodology to test and isolate and solve issues like this one. I could use a lot of help and guidance in figuring out the best way to accomplish it. Because GitHub is so noisy and I usually have a dozen things going in parallel, Discord is going to be the better place to collaborate and figure this out. Thi is also connected to the bigger issue of how to improve the reliability and stability of Marlin's components generally as we go forward. I took a peek at Klipper source code yesterday and saw some things that inspired and humbled me. So I'm open to any and all suggestions about improving the quality of this project and its processes. |
Similiar problem on GT2560 V4 A20 with Marlin 2.1.2.1 CLASSIC_JERK enabled |
Hi. This doesn't sound like it's related to the issue discussed here since you don't use Junction Deviation. Further, retractions are normally controlled by the slicer and this issue affects curved surfaces while you report problems in corners. Probably best to ask around in the Marlin Discord channel for some help with diagnosing your issue. |
A year later hopefully not late to the party. I was also suffering from this, and extreme layer shifting issues at "high" speeds (150+). Recently I realized that I still have Having Disabling ADAPTIVE_STEP_SMOOTHING I could test the machine with 15k accel 300mm/s with zero layer shift or curve stutter. ADAPTIVE_STEP_SMOOTHING seem to severely decrease the potential torque of the motors in exchange of being completely silent, causing shifting even in relatively low speeds, without the motors running on unnecessarily high currents (1050mA in my case when it was relatively stable). Combining ADAPTIVE_STEP_SMOOTHING and stealthChop together make the machine useless, skipping steps even at the 3-4k acceleration range. Find my configuration.h and configuration_adv.h on the links. |
Greetings from the Marlin AutoBot! Disclaimer: This is an open community project with lots of activity and limited |
Bug Description
With Junction deviation enabled the printer decelerates and accelerates unexpectedly on smooth curves.
JUNCTION_DEVIATION_MM
is set to 0.017. There is no difference if I increase it to 0.2.In this picture I have marked the locations where the slowdown occurs with arrows. This happens at other locations as well but these are the most obvious.
With
CLASSIC_JERK
the print is smooth and without unexpected deceleration / acceleration.Example videos (look at the extruder visualizer when this happens):
With Junction Deviation = 0.017
With Classic Jerk
My Configurations
LIN_ADVANCE
is enabled andLIN_ADVANCE_K
is set to 0.1. Settings this to 0 has no effect.S_CURVE_ACCELERATION
is enabled.Configurations.zip
Steps to Reproduce
Print a large curved object like the one in the photo.
Expected behavior:
The curve is printed smooth, just like with classic jerk.
Actual behavior:
The curve is printed with at least decelerated/accelerated moves.
I'm using Marlin bugfix-2.0.x commit e7a9f17 from March 22nd.
The text was updated successfully, but these errors were encountered: