- Posts: 2419
- Thank you received: 2349
scurve trajectory planner
- Grotius
- Offline
- Platinum Member
-
Less
More
1 year 8 months ago #321132
by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi,
I thought, mabye just start coding a clothoid lib. And try to
understand how 3d clothoids work.
I followed this paper, the same as Andrew used : 2d clothoid
Then coded chapter 4 into c code.
Was also able to look into Andrews clothoid code from where i
borrowed the gaus legendre.
With a little assistance of DeepSeek i was able to get a single 2d clothoid
running and plotted with gnu plot.
Then i turned on my experimental mode and tried to expand the signle 2d clothoid
to a single 3d clothoid.
The 3d clothoid uses torsion. To keep it simple i used simple names in the c code.
theta0 & kappa0 -> xy
theta1 & kappa1 -> z
I think the hard part is really the bi-clothoid fitting, wich has to be coded yet.
Code so far:
libclothoid
Gnu plot of single 3d clothoid:
I thought, mabye just start coding a clothoid lib. And try to
understand how 3d clothoids work.
I followed this paper, the same as Andrew used : 2d clothoid
Then coded chapter 4 into c code.
Was also able to look into Andrews clothoid code from where i
borrowed the gaus legendre.
With a little assistance of DeepSeek i was able to get a single 2d clothoid
running and plotted with gnu plot.
Then i turned on my experimental mode and tried to expand the signle 2d clothoid
to a single 3d clothoid.
The 3d clothoid uses torsion. To keep it simple i used simple names in the c code.
theta0 & kappa0 -> xy
theta1 & kappa1 -> z
I think the hard part is really the bi-clothoid fitting, wich has to be coded yet.
Code so far:
libclothoid
Gnu plot of single 3d clothoid:
The following user(s) said Thank You: akb1212, tivoi
Please Log in or Create an account to join the conversation.
- automata
- Offline
- Premium Member
-
Less
More
- Posts: 105
- Thank you received: 93
1 year 8 months ago #321143
by automata
Replied by automata on topic scurve trajectory planner
Hi Grotius,
I feel that for 3 axis Gcode, your earlier method of applying 2D bi-clothoids by considering them in the plane holding the two lines should be sufficient for line-line, line-arc and arc-line cases. Only in arc-arc case, you may run into this 3D clothoid / torsion scenario.
-automata
I feel that for 3 axis Gcode, your earlier method of applying 2D bi-clothoids by considering them in the plane holding the two lines should be sufficient for line-line, line-arc and arc-line cases. Only in arc-arc case, you may run into this 3D clothoid / torsion scenario.
-automata
Please Log in or Create an account to join the conversation.
- FabianB
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 19
1 year 8 months ago - 1 year 8 months ago #321156
by FabianB
Replied by FabianB on topic scurve trajectory planner
Hi Grotius,
thanks for all the work you have put into this project to bring s curves to LinuxCNC. That's a really impressive achievement. Julian told me about your work.
I have not yet managed to work through all the papers in detail which you have linked so I might be a little bit underinformed but your definition of your torsion for 3D clothoids seems to be a bit unusual (or I don't understand it).
Is your intention like this?
theta0 & kappa0 -> xy => kappa0 = curvature
theta1 & kappa1 -> z => kappa1 = torsion for the 3D case
This would fit to your first approach to extend a clothoid to 3D by simply adding a second clothoid to the z dimension (which does not result in a curve with perfect curvature and torsion transition but probably way better than before). However, this is not how curvature and torsion of a 3D curve are defined in general so it will not fit to the 3D clothoid description in the Frego paper.
Best regards,
Fabian
thanks for all the work you have put into this project to bring s curves to LinuxCNC. That's a really impressive achievement. Julian told me about your work.
I have not yet managed to work through all the papers in detail which you have linked so I might be a little bit underinformed but your definition of your torsion for 3D clothoids seems to be a bit unusual (or I don't understand it).
Is your intention like this?
theta0 & kappa0 -> xy => kappa0 = curvature
theta1 & kappa1 -> z => kappa1 = torsion for the 3D case
This would fit to your first approach to extend a clothoid to 3D by simply adding a second clothoid to the z dimension (which does not result in a curve with perfect curvature and torsion transition but probably way better than before). However, this is not how curvature and torsion of a 3D curve are defined in general so it will not fit to the 3D clothoid description in the Frego paper.
Best regards,
Fabian
Last edit: 1 year 8 months ago by FabianB. Reason: typo
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
1 year 8 months ago #321187
by Grotius
Replied by Grotius on topic scurve trajectory planner
@Fabian,
Thanks for writing me. Mabye you could help us?
The frego paper i tried to read it tonight. It brings up several idea's how clothoids where solved in the past.
And then it bring's up a closed form solution.
However i just miss the knowlegde here to understand how it's done.
This paper i would bring under attention, it uses 4 clothoids to generate a clothoid spline fillet in 3d.
The mathematics are quite well documented. And the result pictures look very promising.
clothoid paper 3d_1
Thanks for writing me. Mabye you could help us?
The frego paper i tried to read it tonight. It brings up several idea's how clothoids where solved in the past.
And then it bring's up a closed form solution.
However i just miss the knowlegde here to understand how it's done.
This paper i would bring under attention, it uses 4 clothoids to generate a clothoid spline fillet in 3d.
The mathematics are quite well documented. And the result pictures look very promising.
clothoid paper 3d_1
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
1 year 8 months ago #321191
by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi automata,
Yes you are right.
We will try to implement 3d clothoid.
If this won't succeed we revert to your method.
Yes you are right.
We will try to implement 3d clothoid.
If this won't succeed we revert to your method.
Please Log in or Create an account to join the conversation.
- FabianB
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 19
1 year 8 months ago #321217
by FabianB
Replied by FabianB on topic scurve trajectory planner
The closed form solution from the Frego paper only works if the clothoid starts with curavture and torsion = 0 aka from a straight line. So for our usecase this can not be used in all situation, only if we we want to connect to a straight line and not to arcs or splines etc.
Thanks for the new paper, I will read it later.
Thanks for the new paper, I will read it later.
Please Log in or Create an account to join the conversation.
Time to create page: 1.129 seconds