scurve trajectory planner

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
05 Feb 2025 21:29 #320793 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Automata,

Thanks for reporting, your mail ended up in google's spambox.
Send you mail back.

We are still working on the trajectory planner. And thanks for your clothoid suggestion.
It looks indeed the lenght is absolute. I didn't know that.

Thanks so far !

@Rda,

Thanks for support !

Please Log in or Create an account to join the conversation.

More
06 Feb 2025 12:28 #320828 by Coyote
Replied by Coyote on topic scurve trajectory planner
Great news. Just some clarification: is this planner based on your work or it is based on Ruckig Lib with user @Beef : "That's why Grotius and I have decided to start this new project ...." ?

Please Log in or Create an account to join the conversation.

More
06 Feb 2025 14:06 #320830 by automata
Replied by automata on topic scurve trajectory planner
Hi Grotius,
maybe the biclothoid library stuff you and andrew2085 developed in a previos thread is awesome.
forum.linuxcnc.org/38-general-linuxcnc-q...ruckig-lib?start=350

Maybe that can be used for filleting. And since we can calculate the length of a clothoid given its start and end curvature, maybe it can be used for the S curve trajectory generator more easily and without approximating the arc length.

Thanks for working on this hard problem.
-automata
The following user(s) said Thank You: Grotius, Beef

Please Log in or Create an account to join the conversation.

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
06 Feb 2025 14:41 #320832 by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi Automata,

andrew2085 was very helpfull. It was hard to get his code to work properly.

We have a robust clothoid 2-dimensional library.  
For now it lack's the 3-dimensional clothoid implementation.
github.com/ebertolazzi/Clothoids/issues/45
I am unable to create the 3d clothoid from his comments.

A clothoid needs a iteration ~20  to find optimal fit. This is also the case at a runtime interpolation when u
use the clothoid library in a standard way.

The new approach is time optimal. By this i mean the "arc-strip" method for curves of any type.
The new planner's infrastructure makes it easy to add new trajectory smooth algo's. So almost anyone can
add a algo to it. Sinds it also has a algo template.

Using a clothoid is a very good approach, i agree 100% with that.

Downside is that the real deviation is hard to find. Then 2 attached clothoids could do exact deviation.

When optimizing the path at load time, the clothoid is constructed (~20 clothoid iterations are done) and clothoid is
saved as arc_strip to be interpolated as fast as can be later on.
Soon i wil test a clothoid this way.

Julian made a test environment to test multiple cnc files in a loop. The velocity's are extreme.
We had scurve hang's in certain cases early'er this week. After figuring out, we had some isnan values coming up so now and then.
Isnan = is not a number. This can happen when dividing to zero for example.

We decided that the planner has to first pass test bench, before going any further writing smooth algo's on top.

Let's run the test environement for a few more hours.


 
Attachments:
The following user(s) said Thank You: tivoi, Aciera, Darium, Beef, Unlogic

Please Log in or Create an account to join the conversation.

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
07 Feb 2025 12:20 #320906 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Coyote,

Great news. Just some clarification: is this planner based on your work or it is based on Ruckig Lib with user @Beef : "That's why Grotius and I have decided to start this new project ...." ?

The planner is not based on Ruckig Lib. And Beef is still in contact with us.
Beef has done his Master Degree in the mean time.

The intention once was to use the Ruckig lib. Ruckig is not free in use when you want to calculate trajectory waypoint's,
want to use endvelocity's at waypoints etc.

To overcome this problem, we use our own scurve implementation based on science paper.'s
And the scurve code is open source and free to use.

It just runned a test bench at Julian's place for 13 hours without any conflict.
 
The following user(s) said Thank You: Coyote, pommen, tiagounderground, Darium, Beef

Please Log in or Create an account to join the conversation.

More
07 Feb 2025 17:05 #320925 by ihavenofish
Replied by ihavenofish on topic scurve trajectory planner


Beef has done his Master Degree in the mean time.


Beef mostly just mutters in the corner these days about everyone being jerks...


*tries to start some forum beef*
:P



 

Please Log in or Create an account to join the conversation.

More
07 Feb 2025 20:57 #320937 by juliankoenig87
Replied by juliankoenig87 on topic scurve trajectory planner
Hi.
So, I tested the scurve with my loop machine for over 18 hourse. No crashes. And I really try to torture it with extreme values. I would call it a sucess and really good coding by Grotius. Well done.

I will go on and do some tests and thinking of backlash compensation this weekend. Have some thoughts but have to figure it out first.
The following user(s) said Thank You: tommylight, Beef, Unlogic

Please Log in or Create an account to join the conversation.

More
07 Feb 2025 21:17 - 07 Feb 2025 21:22 #320939 by Beef
Replied by Beef on topic scurve trajectory planner
@Coyote no I didn't have any role here. This is all Grotius' genius on display. I got buried under school responsibilities and managing now two businesses so I haven't been too active in machining over the last year

@ihavenofish this is beyond dad joke into grandpa joke territory

@Grotius I have tested the scurve on my machine for motion (although I haven't tested probing/toolsetting/cutting). I somehow managed to destroy a spindle bearing a while back and turn it into a spindle bushing, and I just got a new spindle earlier this week - I should have time to install the  VFD into the electronics cabinet next week and set up the new spindle, and will send some videos of cutting differences once that's done.
Last edit: 07 Feb 2025 21:22 by Beef.
The following user(s) said Thank You: Coyote, Grotius

Please Log in or Create an account to join the conversation.

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
10 Feb 2025 01:43 #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:
 
Attachments:
The following user(s) said Thank You: tivoi

Please Log in or Create an account to join the conversation.

More
10 Feb 2025 08:35 #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

Please Log in or Create an account to join the conversation.

Time to create page: 0.351 seconds
Powered by Kunena Forum