Closed Traumflug closed 10 years ago
I'm trying to grok your graphs, but I'm not seeing it. I see some sporadic speed changes (steps/s) but does this translate into step losses (position error)?
I see some sporadic speed changes (steps/s) but does this translate into step losses (position error)?
In the real world it does. The fact there are some 20 tiny movements shouldn't be visible, ideally this would look like a single movement. Especially as these are movements on the X axis only, so jerk doesn't apply.
The good news: a try on a PCB made it some 50% today. If each movement is long enough, it works excellent already.
Here's another graph, with positions 5.1, 5.4 and 5.6 mm (yellow dashed lines, some movement targets) marked:
I've cobbled some tools together to plot position and velocity with the PC-simulator. I'll push them to experimental soon. I put them in tools. Feel free to move them.
It's no better than your simulavr graphs, but it does not require the simulavr setup.
Anyway, here's the graph of my earlier fail-test without lookahead:
$ cat fail.gcode
G1 F500 X10
G1 F500 X20
G1 F500 X30
G1 F500 X40
G1 F500 X10
G1 F500 X20
G1 F500 X30
G1 F500 X40
G1 F500 X10
G1 F500 X20
G1 F500 X30
G1 F500 X40
G1 F500 X10
G1 F500 X20
G1 F500 X30
G1 F500 X40
G1 F500 X10
G1 F500 X20
G1 F500 X30
G1 F500 X40
$ make && ./sim fail.gcode --tracefile=fail.trace --time-scale=0 --gcode
$ tools/velocity_plot.sh fail.trace
Here it is with lookahead turn on:
What I noticed earlier is that the first lookahead opportunity seems always to be missed for me. Are you seeing this same omission?
What I noticed earlier is that the first lookahead opportunity seems always to be missed for me.
That's expected. The first move is executing before the second one comes in, after all, and already executing movements are not touched by lookahead.
This is the way it should work:
As the picture also demonstrates, it actually does work now. Today I run an entire Gen7 isolation milling with lookahead for the very first time in my life. To celebrate this, I picked all of the experimental branch to master and all of the cross branch to experimental. Several issue branches are gone. :-)
Nice job! This looks really excellent.
Here are some "before and after" traces from testcases/smooth-curves.gcode. Notice that the without-lookahead version takes almost twice as long (ACCELERATION=10).
With LOOKAHEAD disabled:
With LOOKAHEAD enabled:
What's the state of LOOKAHEAD now? I'm putting my printer back together after some kid damage and a long hiatus, and am trying to get up-to-date.
For the records: short of yet to detect misbehaviour, lookahead works fine now.
G-code is testcases/short-moves.gcode, the result speaks for its self: