- Posts: 2419
- Thank you received: 2349
Trajectory Planner using Ruckig Lib
- Grotius
- Offline
- Platinum Member
-
Less
More
2 years 5 months ago #301198
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@Becksvill,
Looks awesome Grotius
I'm also following this closely
I have a 22 ton 5axis machine I would love to see this working on
It has rapids of 40m per min so very fast and heavy. Would be a good torture test of your scurve code
Good idea to test this out soon! If you press stop in lcnc using 40m/min. I mean using the trapezium planner,
what will happen to your machine? Is the building shaking or is the machine walking to outside?
I ask this because a stop is very dangerous. I would to see happen a mavel to zero pause instead, Then realease the servo
drives. Or use the servo brakes is this is possible.
@Andrew,
I agree that tangents also don't satisfy the perfect solution.
If you make a proposal in the code language you like, we can test it.
As today i am ready create fillets in 3 contours, fillets are made from polyline to polyline. The polyline may be a line or arc.
Looks awesome Grotius
I'm also following this closely
I have a 22 ton 5axis machine I would love to see this working on
It has rapids of 40m per min so very fast and heavy. Would be a good torture test of your scurve code
Good idea to test this out soon! If you press stop in lcnc using 40m/min. I mean using the trapezium planner,
what will happen to your machine? Is the building shaking or is the machine walking to outside?
I ask this because a stop is very dangerous. I would to see happen a mavel to zero pause instead, Then realease the servo
drives. Or use the servo brakes is this is possible.
@Andrew,
I agree that tangents also don't satisfy the perfect solution.
If you make a proposal in the code language you like, we can test it.
As today i am ready create fillets in 3 contours, fillets are made from polyline to polyline. The polyline may be a line or arc.
The following user(s) said Thank You: akb1212, tommylight, Unlogic
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 42
2 years 5 months ago #301238
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
I did a little playing around here
colab.research.google.com/drive/1UHn0M74...8Aln1z77?usp=sharing
with what I read in this paper
www.researchgate.net/publication/2926698..._Numerical_Algorithm
. Basically you give the algorithm a starting position, radius, angle, angular direction, and ending angle and it generates a matching clothoid curve. You don't know the ending position until the computation is finished so it will have to be translated after. I'm not sure if this would cause problems that couldn't be dealt with.
There could be other curves that are easier to work with, but I think it might be important that they have closed-form solutions to solving the jerk at a given point and velocity on the curve for efficient trajectory planning. The clothoid is easy in this sense, but harder in actually fitting it to the path geometry. B-splines have C2 curvature continuity so jerk could be limited, but I haven't looked into them further yet.
The s-curve generator is coming along well, it seems very fast.
There could be other curves that are easier to work with, but I think it might be important that they have closed-form solutions to solving the jerk at a given point and velocity on the curve for efficient trajectory planning. The clothoid is easy in this sense, but harder in actually fitting it to the path geometry. B-splines have C2 curvature continuity so jerk could be limited, but I haven't looked into them further yet.
The s-curve generator is coming along well, it seems very fast.
The following user(s) said Thank You: akb1212, Grotius
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
2 years 5 months ago #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.
The following user(s) said Thank You: akb1212, tommylight, Lcvette
Please Log in or Create an account to join the conversation.
- automata
- Offline
- Premium Member
-
Less
More
- Posts: 105
- Thank you received: 93
2 years 5 months ago - 2 years 5 months ago #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: 2 years 5 months ago by automata. Reason: Adding more links and information.
The following user(s) said Thank You: akb1212, tommylight, Lcvette, Grotius
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
2 years 5 months ago #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.
The following user(s) said Thank You: akb1212, Lcvette
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
2 years 5 months ago #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.
Time to create page: 0.255 seconds