Hi Rod,
Thanks for your comment.
I have to be more specefik.
In the lcnc code there is a G64P0.01 to stay on path.
This will eliminate the cnc motion overshoot's in blue. I think the off path dist called "Ferror" in the ini files.
The motionplanner i have written calculates a path from a gcode. For example line 1,2 + arc 3 + line 4 + 5 will
be a motion where the s-curve does it's thing from start to end.
This video shows how the motion is done :
user-images.githubusercontent.com/448801...7ee-0a229e1caa60.mp4
The stepgen component will try to stay at tcp speed, but
will overshoot at some corners if the machine speed is too high. There are plenty senario's where the machine has to slow down, but there are also plenty senario's where the machine may stay at full speed.
Therefore i have the idea to make a look ahead function that samples the Velocity end, Velocity start to get optimal results.
Green is a programmed value like Velocity : 10.
After the algo is done, it turn's out the machine will not overshoot if the Velocity-end of 1 = 8.
And so on.
So every gcode line has to be sampled and will get a different optimal value for Velocity start and Velocity end.
The s-curve max velocity will be used always. So when the machine can do it, it will go full trottle.
But with complex gcode it will sample until it will find the best g-force results, according to the acc and dcc values.
The picture is made with : sudo apt-get install gnome-paint