Home › Forums › TinyG › TinyG Support › Angles smaller than 8 degree break motion planning
- This topic has 3 replies, 2 voices, and was last updated 11 years, 7 months ago by
moeter.
-
AuthorPosts
-
July 23, 2014 at 10:17 am #6453
moeter
MemberOkay, now I found something really odd:
I am trying to draw a circle with line segments, calculated by the controlling PC. When using 44 segments for a circle, everything is fine. When I use 45 or more segments, e.g. direction changes of less than 8 degrees, all hell breaks loose:
-No more decceleration/acceleration for the corners
-Speed ALWAYS stays on maximum speed given by F
-Infinite jerk/acceleration, thus stalling motorsThe radius of the circle has no influence on this behaviour, nor does speed or any parameter that I can think of…
After digging around a little, I suspect the cornering algorithm getting into numerical inconsistencies: 8 degrees is the point, where 1-cos(theta) gets smaller than 0.01… but that’s actually a wild guess.
Here are two GCODE examples, one that triggers this behaviour (45 segment “circle”, radius 100, center 0), and another one that doesnt (44 segment “circle”).
Don’t use them on any real machine without inhibiting the axes.
http://pastebin.com/BuZB0sJY
(theres a G1 missing in example 1, but that’s just a copy&paste mistake)By the way, I’m on Edge 435.10, will try the same on the stable build.
July 23, 2014 at 10:42 am #6454moeter
MemberFound it in the sources:
https://github.com/synthetos/TinyG/blob/edge/firmware/tinyg/plan_line.c#L494
-0.99 needs to be closer to -1. Something like -0.9999 should be sufficient, this would include all angles larger than 1°.
-
This reply was modified 11 years, 7 months ago by
moeter.
July 24, 2014 at 5:26 am #6473alden
MemberThanks for the heads up. I’ll check into this.
July 24, 2014 at 7:26 am #6476moeter
MemberTried it with -0.99999, it’s working.
This keeps the line planning intact for angles down to 0.256°. I guess smaller angles can really be assumed to be straight lines for machines in our scale.
Actually, we could calculate the value where we can consider a junction as straight line as a relationship of the maximum speed, maximum jerk, microsteps and the mm/rev parameters. We may never exceed the maximum jerk in the duration of one (micro)step to assume the junction to be a straight line. I’ll try to put this into a formula, but this might be complicated…
-
This reply was modified 11 years, 7 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.