scurve trajectory planner

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
19 Feb 2025 19:23 #322011 by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi,

I have tried another solver: "libgsl".     ( sudo apt-get install libgsl-dev )   Using the GPU. ..

This runs way better then libdogleg. Was a luckie shot.

In this solver bigger distances are ok.
Input :
    // Start point.
    double xs = 0.0;
    double ys = 0.0;
    double zs = 0.0;

    // Target point.
    double xe = 520.05;
    double ye = 266.50;
    double ze = 125.50;

    // Guess.
    double s1 = 0.00;
    double gamma10 = 0.000; // Z
    double gamma20 = 0.000; // Xy.


interpolated endpoint result : x: 520.049999 y: 266.500001 z: 125.500000
Converged after 370 iterations wtf? 

Now i get more convinced finally.
Attachments:

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

More
19 Feb 2025 19:53 - 19 Feb 2025 19:53 #322013 by Aciera
Replied by Aciera on topic scurve trajectory planner
Moved to another PC, installed 'libdogleg-dev' and I seem to get a little further but not much:

 

Anyway, I'm afraid there is not much I can think of to help as I'm really starting a zero with these dogleg solvers.
Attachments:
Last edit: 19 Feb 2025 19:53 by Aciera.
The following user(s) said Thank You: Grotius

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
19 Feb 2025 20:07 - 19 Feb 2025 20:08 #322016 by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi Arciera,

use libgsl example. Remove all libdogleg related files and deps.
Last edit: 19 Feb 2025 20:08 by Grotius.
The following user(s) said Thank You: Aciera

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

More
20 Feb 2025 06:10 #322032 by Aciera
Replied by Aciera on topic scurve trajectory planner
yes that looks much better and compiles for me too.
The following user(s) said Thank You: Grotius

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

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

Today i started coding the clothoid compound fit using the gsl solver. It worked right away.
I think because yesterday we did it succesfully for just one clothoid.

This is really a milestone for us !!!

What we see here is a 3d clothoid spline, build from 4 individual clothoids, given start, end posture.

Given the abstract :
"Space corner smoothing of CNC machine tools through developing 3D general clothoid"
by Qun-Bao Xiao, Min Wan, Yang Liu, Xue-Bin Qin, and Wei-Hong Zhang.
Published in Robotics and Computer Integrated Manufacturing, Volume 64, 2020.


However if you look closely at the individual clothoid curve transitions there is a tiny change in curvature.
Somewhere in the code is a buggybug.    and or alien obstruction.
I think in eq45 where the constrains of the joints are calculated must be something signed to "-" ?
// Start point.
double xs = 0.0;
double ys = 0.0;
double zs = 0.0;

// Target point.
double xe = 520.05;
double ye = 266.50;
double ze = 125.50;

// Start angles, end angles.
double degrees_xy_start = 45.0;
double degrees_xy_end = 0.0;
double degrees_z_start = 0.0;
double degrees_z_end = -45.0;

 
Converged after 315 iterations
Solution found: gamma10 = 0.000000, gamma20 = -0.000000, s1 = 198.587624
endpoint x: 520.050004 y: 266.500006 z: 125.499999
Attachments:

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

More
20 Feb 2025 12:10 #322050 by Aciera
Replied by Aciera on topic scurve trajectory planner

This is really a milestone for us !!!

Indeed! Congratulations.

However if you look closely at the individual clothoid curve transitions there is a tiny change in curvature.


Is eq 45 in the loop yet?
The following user(s) said Thank You: Grotius

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

More
20 Feb 2025 12:21 #322051 by Aciera
Replied by Aciera on topic scurve trajectory planner
I can't quite tell from your repo so you may already have but just in case:
Remember that we need to run eq 45 with the gamma11, gamma21 and s1 values found with dogleg. With the 6 resulting gamma values it should then satisfy G1, G2 and G3 continuity.

 
Attachments:
The following user(s) said Thank You: Grotius

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

More
20 Feb 2025 12:38 #322053 by Aciera
Replied by Aciera on topic scurve trajectory planner
I don't think these gamma values look right:
yi1: 0.000000 
yi2: -0.000001 
yi3: 0.000001 
yi4: -0.000000 
yi1: -0.000000 
yi2: -0.000000 
yi3: 0.000000 
yi4: -0.000000 
The following user(s) said Thank You: Grotius

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

More
20 Feb 2025 12:45 - 20 Feb 2025 12:47 #322055 by Aciera
Replied by Aciera on topic scurve trajectory planner
Actually the problem might be in the dogleg algo, seems odd to me that gamma11 and gamma21 are zero.

Solution found: gamma10 = 0.000000, gamma20 = -0.000000, s1 = 198.587624
 


Could it be that we are only solving for variable s1 instead of [gamma11, gamma21, s1]?
Last edit: 20 Feb 2025 12:47 by Aciera.
The following user(s) said Thank You: Grotius

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

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

I made a test : clothoid_compound_no_fit();

This visualises the problem quite good. This example uses no fit for endpoint. So the clothoid compound
behaves as a natural attached curve.

eq44 is reviewed and i added the for loop check calculations as in the paper.
However the tresholds results there are ok.
eq45, i can not find any typo's.

eq45 is sub off eq44_G123. Yes eq45 is in the loop.

With the 6 resulting gamma values it should then satisfy G1, G2 and G3 continuity.
Yes. eq45 is called for xy and for z.

Then yi1 is called like : y11 for z
Then yi1 is called like : y21 for xy.

This to avoid code duplication.
The following user(s) said Thank You: Aciera

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

Time to create page: 0.155 seconds
Powered by Kunena Forum