scurve trajectory planner

  • Grotius
  • Grotius's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
18 Feb 2025 11:45 - 18 Feb 2025 12:06 #321911 by Grotius
Replied by Grotius on topic scurve trajectory planner
 Hi Arciera,

Here is a basic  powel example. It uses a equatation with 2 unknown's.
This example run's ok.
powel basic example

The residual  = distance ( guess position result from first calculation up to final end position. )

I just found out why to use the gaus method....
gaus calculates clothoid length

I found it by accident, when computing the endpoint of the clothoid compound in a optimized function.
it turn's out that the Gauss method is used to get very high accuracy in a few iterations.
My current approach has the property to drift off. As values are incremented including nummerical errors.

So now finally i know why gauss is used.

Gaus vs Drift:
 

I guess we could simply calculate the length of our 3D residual vector and pass that back as the error value to be minimized.
Yes. Excact. That's going to be tested.
Attachments:
Last edit: 18 Feb 2025 12:06 by Grotius.
The following user(s) said Thank You: tommylight, HalaszAttila, Beef

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

More
18 Feb 2025 13:25 #321913 by Aciera
Replied by Aciera on topic scurve trajectory planner
20 iterations vs 1000
Nice.
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 10:26 #321971 by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi,

I have implemented dogleg. The source is updated.

At least it does something. But something is not ok and i don't know what.

Given Target = x100, y2, z2.
Dogleg result : x1.99 y1.99 z100.00

But i guess this result is luck. Because other values can completely mesh up the clothoid result.
Attachments:
The following user(s) said Thank You: Aciera

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

More
19 Feb 2025 12:29 #321977 by Aciera
Replied by Aciera on topic scurve trajectory planner
How would I add the dogleg dependencies to your cloned repo?
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 13:01 #321980 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Arciera,

I think this : sudo apt-get install libdogleg-dev

In the mean time, i have seen the params[index], had a flaw. I repaired that. Git is updated.
Now still wrong results. I think the Jacobian setup is incorrect also.
The following user(s) said Thank You: Aciera

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

More
19 Feb 2025 13:13 #321982 by Aciera
Replied by Aciera on topic scurve trajectory planner
I get this error when building your repo:
 
Attachments:
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 13:39 - 19 Feb 2025 13:47 #321985 by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi Arciera,
I installed both off them in a hurry. I think this one :sudo apt-get install libdogleg2

apt-cache search libdogleg -> gives both :  libdogleg-dev  & libdogleg-dev

Ok,

I am a little further.
There is added a test : single_clothoid_fit();

This is a test, given a clothoid start point, end point.
It is a single clothoid, so no clothoid compound.
Last edit: 19 Feb 2025 13:47 by Grotius.

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

More
19 Feb 2025 14:13 - 19 Feb 2025 14:14 #321990 by Aciera
Replied by Aciera on topic scurve trajectory planner
I have those installed but still complains about missing 'cholmod.h': 
 
Attachments:
Last edit: 19 Feb 2025 14:14 by Aciera.

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

More
19 Feb 2025 14:45 #321991 by Aciera
Replied by Aciera on topic scurve trajectory planner
strange thing is that I seem to able to build 'libdogleg' git repo you linked above which also includes 'chmod.h'. Had to install 'mrbuild' though.

 
Attachments:
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 17:13 - 19 Feb 2025 17:16 #322006 by Grotius
Replied by Grotius on topic scurve trajectory planner
Hi Arciera,

Mr build? Huh.  Wich dep is that?

I am able to let the single clothoid finish at target position ~ 50% off the cases.
using example : single_clothoid_fit();

Dogleg fails to find solution very often. Tarpos in the range x20 is ok. x200 is failing all the time.

The good news is, it works partially.
The bad new is, is fails a lot.

Here it does the job ok:
// Start point.
double xs = 0.0;
double ys = 0.0;
double zs = 0.0;

// Target point.
double xe = 11.00;
double ye = 5.00;
double ze = 2.2;

// Guess.
double s1 = 0.001;
double gamma10 = 0.0001; // Z
double gamma20 = 0.0001; // Xy.

double degrees_xy_start = 0.0;
double degrees_z_start = -20.0;



So now what to do?
Maybe try another library?

interpolation endpoint result : endpoint x: 11.000000 y: 5.000000 z: 2.000000
Attachments:
Last edit: 19 Feb 2025 17:16 by Grotius.
The following user(s) said Thank You: Aciera

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

Time to create page: 0.153 seconds
Powered by Kunena Forum