Trajectory Planner using Ruckig Lib
23 May 2024 21:08 #301258
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@ Hi Andrew,
Impressive work so far!
Should we focus on the clothoid curve part first? Or what do you think?
I see the scurve looks oke, also a linear stage between concave & convex, nice.
For me the hard part is then to interpolate the clothoid curvature.
I havo no clue how to setup the formula's to create the clothoid path from the paper at this moment.
Do you have any insights to that already? I have seen a few sin in your code, but not related to path processing?
@ All,
Currently the gcode is loaded including empty fillets. The cavalier 3d fillet algo also processes fillets. Up to then it works.
I had a lot off work to get all info ready from the cavalier contour to be used for a lcnc gcode segment.
Tommorow i will try to get something to work.
Impressive work so far!
Should we focus on the clothoid curve part first? Or what do you think?
I see the scurve looks oke, also a linear stage between concave & convex, nice.
For me the hard part is then to interpolate the clothoid curvature.
I havo no clue how to setup the formula's to create the clothoid path from the paper at this moment.
Do you have any insights to that already? I have seen a few sin in your code, but not related to path processing?
@ All,
Currently the gcode is loaded including empty fillets. The cavalier 3d fillet algo also processes fillets. Up to then it works.
I had a lot off work to get all info ready from the cavalier contour to be used for a lcnc gcode segment.
Tommorow i will try to get something to work.
Please Log in or Create an account to join the conversation.
24 May 2024 03:56 - 24 May 2024 06:05 #301283
by automata
Replied by automata on topic Trajectory Planner using Ruckig Lib
@grotius
Excellent work. Looking forward to try this out on high speed machines.
@grotius @Andrew as per the suggestion of this paper, you can look at bi-clothoids for filleting:
www.researchgate.net/publication/3246504...h_speed_CNC_machines
www.researchgate.net/publication/3318941...h_Speed_CNC_Machines
The paper suggests how to fit bi-clothoids as fillets.
Also since bi-clothoids can be parameterized by their curve lengths, it may fit easier in the tangential jerk limitation and look ahead algorithms.
Jerk can be broken into 2 components namely tangential and normal to the path. Tangential jerk can be minimised by temporal optimization of the trajectory. However, normal jerk is inherent to the path being traversed and cannot be eliminated by look ahead or 1d jerk limiting the path.
For normal jerk minimisation the path needs to be modified. One method is to use fillets which will minimize the normal jerk at the intersections.
Arc fillets by definition do not satisfy this condition as they introduce a non C2 continuity at the transfer point. Don't get me wrong, arc fillets with C1 continuity should fare better than an angle where there is only C0 continuity.
More information on c0 C1 C2 continuity can be looked up at :
Once again, congratulations on the great work. Looking forward to try this out.
- automata
Excellent work. Looking forward to try this out on high speed machines.
@grotius @Andrew as per the suggestion of this paper, you can look at bi-clothoids for filleting:
www.researchgate.net/publication/3246504...h_speed_CNC_machines
www.researchgate.net/publication/3318941...h_Speed_CNC_Machines
The paper suggests how to fit bi-clothoids as fillets.
Also since bi-clothoids can be parameterized by their curve lengths, it may fit easier in the tangential jerk limitation and look ahead algorithms.
Jerk can be broken into 2 components namely tangential and normal to the path. Tangential jerk can be minimised by temporal optimization of the trajectory. However, normal jerk is inherent to the path being traversed and cannot be eliminated by look ahead or 1d jerk limiting the path.
For normal jerk minimisation the path needs to be modified. One method is to use fillets which will minimize the normal jerk at the intersections.
Arc fillets by definition do not satisfy this condition as they introduce a non C2 continuity at the transfer point. Don't get me wrong, arc fillets with C1 continuity should fare better than an angle where there is only C0 continuity.
More information on c0 C1 C2 continuity can be looked up at :
Once again, congratulations on the great work. Looking forward to try this out.
- automata
Last edit: 24 May 2024 06:05 by automata. Reason: Adding more links and information.
Please Log in or Create an account to join the conversation.
25 May 2024 09:08 #301386
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
The fillets are working.
Options during program run :
- use fillets or chamfers.
- Set a G0 fillet size. The rapids can also do fillets.
- Set a G1_G2_G3 fillet size.
So what i learned so far is :
When lcnc loads the gcode line by line at runtime, i add one emtpy line after each loaded segment.
During the program run, buffer is also emptied and new lines are added when using bigger programs.
Then when loading is finished and program run's, it just run's over the empty lines.
Then at runtime the fillets are calculated by the 3d cavalier algo.
It only creates a fillet for your current line & next line.
So it does not fillet the whole path in the same plane, as this would be very nice.
This is too compute expensive to fit in the cycletime and a lcnc signal eleven will occur.
So to minimize the computations, i only did one fillet at a time.
The 3d cavalier algo creates a plane from the current 2 gcode lines. Then it projects the 2 lines to a top view plane,
called the zero plane.
Then in top view the 2d cavalier algo is performed. When this is done, the 3 lines (including fillet) are transformed back
to original position. I think this is a clever method, also for future curves like clothiods etc.
Have fun to watch the fillets at work. Also switching to chamfers & using different fillet values at runtime.
The fillets are working.
Options during program run :
- use fillets or chamfers.
- Set a G0 fillet size. The rapids can also do fillets.
- Set a G1_G2_G3 fillet size.
So what i learned so far is :
When lcnc loads the gcode line by line at runtime, i add one emtpy line after each loaded segment.
During the program run, buffer is also emptied and new lines are added when using bigger programs.
Then when loading is finished and program run's, it just run's over the empty lines.
Then at runtime the fillets are calculated by the 3d cavalier algo.
It only creates a fillet for your current line & next line.
So it does not fillet the whole path in the same plane, as this would be very nice.
This is too compute expensive to fit in the cycletime and a lcnc signal eleven will occur.
So to minimize the computations, i only did one fillet at a time.
The 3d cavalier algo creates a plane from the current 2 gcode lines. Then it projects the 2 lines to a top view plane,
called the zero plane.
Then in top view the 2d cavalier algo is performed. When this is done, the 3 lines (including fillet) are transformed back
to original position. I think this is a clever method, also for future curves like clothiods etc.
Have fun to watch the fillets at work. Also switching to chamfers & using different fillet values at runtime.
Please Log in or Create an account to join the conversation.
25 May 2024 09:16 #301388
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@Automata,
Thanks for your gratulations !
It looks finally we made some progress on the scurve planner. Altough there is a lot to be done.
And there will sure be problems in the future, during testing on high speed machines. But we
can just solve bug by bug.
This document you linked is very nice !.
I there anyone who can help setup the formula's to create the curve's?
Now the planner can do 3d fillets and chamfers, we can just add the clothoid curve function.
The planners infrastructure is ready to add a hal pin to enable clothoid curves.
Also the video with G2 continuity is nice to watch.
Thanks for your gratulations !
It looks finally we made some progress on the scurve planner. Altough there is a lot to be done.
And there will sure be problems in the future, during testing on high speed machines. But we
can just solve bug by bug.
This document you linked is very nice !.
I there anyone who can help setup the formula's to create the curve's?
Now the planner can do 3d fillets and chamfers, we can just add the clothoid curve function.
The planners infrastructure is ready to add a hal pin to enable clothoid curves.
Also the video with G2 continuity is nice to watch.
The following user(s) said Thank You: Lcvette
Please Log in or Create an account to join the conversation.
25 May 2024 09:39 #301390
by andypugh
Apple make a special point of having G2(?) continuity on their products. The corners of an iPhone are not arcs, and people generally think this looks better, even if they don't notice it. Similarly on vehicles, they aim for better continuity so that you don't get straight lines in the reflections.
I found this YouTube video absolutely fascinating on the subject, and I did wonder if the matrix equation shown could be expanded to 3 or 9 axes to solve for the required continuity for CNC use. I think that would be a case of choosing the right boundary conditions and possibly solving iteratively.
(Don't be worried that the video is so long, if you are anything like me you will get to the end thinking it's been 15 minutes)
Replied by andypugh on topic Trajectory Planner using Ruckig Lib
This can be true, i believe you. But what is accepted by the community? A arc blend or a clothoid blend.
If a product has corner with a arc blend, it looks quite nice. If its a non arc shape, i think they are not happy.
Apple make a special point of having G2(?) continuity on their products. The corners of an iPhone are not arcs, and people generally think this looks better, even if they don't notice it. Similarly on vehicles, they aim for better continuity so that you don't get straight lines in the reflections.
I found this YouTube video absolutely fascinating on the subject, and I did wonder if the matrix equation shown could be expanded to 3 or 9 axes to solve for the required continuity for CNC use. I think that would be a case of choosing the right boundary conditions and possibly solving iteratively.
(Don't be worried that the video is so long, if you are anything like me you will get to the end thinking it's been 15 minutes)
Please Log in or Create an account to join the conversation.
25 May 2024 09:41 #301391
by andypugh
This was introduced for spark-eroder applications.
Replied by andypugh on topic Trajectory Planner using Ruckig Lib
The existing LinuxCNC TP already does this, if you set the feed override negative, it runs backwards.Reverse motion might open up the door to replicating the "Traking" feature on Prototrak CNC lathes. It lets you use one of the MPG wheels to move forward or reverse through the program motions.
This was introduced for spark-eroder applications.
Please Log in or Create an account to join the conversation.
25 May 2024 09:46 - 25 May 2024 09:47 #301394
by Aciera
Replied by Aciera on topic Trajectory Planner using Ruckig Lib
Regarding toolpath smothing using clothoids in CNC application. I've posted this before in another thread but the link there seems broken so here it is again:
www.researchgate.net/publication/3318941...cf4408a7c0c/download
www.researchgate.net/publication/3318941...cf4408a7c0c/download
Last edit: 25 May 2024 09:47 by Aciera.
Please Log in or Create an account to join the conversation.
25 May 2024 13:20 #301404
by RDA
Replied by RDA on topic Trajectory Planner using Ruckig Lib
I just want to say, great work everyone! Just let me know where to send beer.
Please Log in or Create an account to join the conversation.
25 May 2024 18:51 #301433
by Lcvette
Replied by Lcvette on topic Trajectory Planner using Ruckig Lib
First of all this is super awesome watching the progress on this project! a huge thank you to those putting the time in.
I wanted to throw this out as this is where my issues arise from with machine shake, it occurs during adaptive cutting tool paths on repositioning moves where a series of short line segments are posted. I have tried using smoothing settings and tolerance settings in fusion but it continues to spit out these short segments. i use G64 with the P value tied to fusion 360's "smoothing" setting, and it helps slightly but the shake at these repositioning moves is terrible, the doors on the machine rattle and shake something fierce and im sure its awesome for the motion mechanicals. I am posting the file and was wondering if perhaps you might be inclined to run it in your test TP and show a comparison of the current stock tp and the new scurve. i have a video here showing the machine shake its pretty ugly.. it was cutting this part, if you have volume you can hear the shudder and if not watch the frames of the doors for the shake.. /o\
Thanks guys!
Chris
repositioning shake video
I wanted to throw this out as this is where my issues arise from with machine shake, it occurs during adaptive cutting tool paths on repositioning moves where a series of short line segments are posted. I have tried using smoothing settings and tolerance settings in fusion but it continues to spit out these short segments. i use G64 with the P value tied to fusion 360's "smoothing" setting, and it helps slightly but the shake at these repositioning moves is terrible, the doors on the machine rattle and shake something fierce and im sure its awesome for the motion mechanicals. I am posting the file and was wondering if perhaps you might be inclined to run it in your test TP and show a comparison of the current stock tp and the new scurve. i have a video here showing the machine shake its pretty ugly.. it was cutting this part, if you have volume you can hear the shudder and if not watch the frames of the doors for the shake.. /o\
Thanks guys!
Chris
repositioning shake video
Attachments:
Please Log in or Create an account to join the conversation.
25 May 2024 19:34 #301439
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi Chris,
I will test the ngc file i the planner coming day's.
Hi All,
Found a nice lib, github.com/ebertolazzi/G1fitting.
This is from university.G1 fitting with clothoidsby Enrico Bertolazzi and Marco FregoWe are now a few commits ahead of the master.
I walk up to the morning sky first. With all my favorite colors. Right on. My sisters and my brothers.
Ok we made a function test in c++ to verify if we can use the bi-clothoid's into the linuxcnc toolpath planner.
The function peaks to : 0.094579000 milliseconds
I will test the ngc file i the planner coming day's.
Hi All,
Found a nice lib, github.com/ebertolazzi/G1fitting.
This is from university.G1 fitting with clothoidsby Enrico Bertolazzi and Marco FregoWe are now a few commits ahead of the master.
I walk up to the morning sky first. With all my favorite colors. Right on. My sisters and my brothers.
Ok we made a function test in c++ to verify if we can use the bi-clothoid's into the linuxcnc toolpath planner.
The function peaks to : 0.094579000 milliseconds
Please Log in or Create an account to join the conversation.
Time to create page: 0.146 seconds