scurve trajectory planner

More
20 Feb 2025 15:21 - 20 Feb 2025 15:23 #322077 by Aciera
Replied by Aciera on topic scurve trajectory planner
This is what I'm working with (compiles and runs without the 'fdf.fvv' function which I don't know anything about while I could probably figure out the fdf.df Jacobian ):

Warning: Spoiler!


Kinda nice to start out with a working example.
Last edit: 20 Feb 2025 15:23 by Aciera.
The following user(s) said Thank You: tommylight, Grotius

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

More
21 Feb 2025 09:30 - 21 Feb 2025 09:44 #322182 by Aciera
Replied by Aciera on topic scurve trajectory planner
Not sure but this looks odd, wouldn't you want to calculate sharpness first to update kappa and then theta?:
 

 
Attachments:
Last edit: 21 Feb 2025 09:44 by Aciera.
The following user(s) said Thank You: Grotius

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

More
21 Feb 2025 09:40 #322183 by Aciera
Replied by Aciera on topic scurve trajectory planner
Something like this:
        // Calculate the clothoid theta, kappa, sharpness at current s.
        double sharpness10_i;
        eq18_single_clothoid(0,sharpness10,gamma1,&sharpness10_i);
        double sharpness20_i;
        eq18_single_clothoid(0,sharpness20,gamma2,&sharpness20_i);
        double kappa10_i;
        eq19_single_clothoid(0,sharpness10_i,kappa10_i,gamma1,&kappa10_i);
        double kappa20_i;
        eq19_single_clothoid(0,sharpness20_i,kappa20_i,gamma2,&kappa20_i);
        double theta10_i;
        eq20_single_clothoid(0,sharpness10_i,kappa10_i,theta10,gamma1,&theta10_i);
        double theta20_i;
        eq20_single_clothoid(0,sharpness20_i,kappa20_i,theta20,gamma2,&theta20_i);
The following user(s) said Thank You: Grotius

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

More
21 Feb 2025 09:56 #322185 by Aciera
Replied by Aciera on topic scurve trajectory planner
Here is my failed attempt:
Warning: Spoiler!


The idea was to calculate the elements of the Jacobian numerically but it fails miserably:

 


 
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
  • Offline
  • Platinum Member
  • Platinum Member
More
21 Feb 2025 09:58 #322186 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Arciera,

Indeed. Good spot !!!

I was thinking about the 3d fitting between gcode segments.
Do we really need the transformation, and then do the fitting in a null plane?
This was needed for a 2d clothoid, when used in a 3d plane. But for this i think
we don't needed, unless there is something i forgot.

I thought maybe we can just fit the clothoids in 3d space.

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

More
21 Feb 2025 10:06 #322188 by Aciera
Replied by Aciera on topic scurve trajectory planner
As i understand it there should be no need for another transformation besides the one described in the paper.
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
  • Offline
  • Platinum Member
  • Platinum Member
More
21 Feb 2025 10:10 - 21 Feb 2025 13:04 #322189 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Arciera,

That's what i think we don't need. If the dogleg solver is able to find the endpoint in 3d space. Why do the tranformations
as used in the abstract?

We have already a case where the helix tail or start from a G2, G3 is used as end vector.

I see you have splitted up the gaus interpolation into x, y, z.

Edit:
Did a mayor update on the infrastructure.
- Use struct for clothoid data.
- Use seperate plot function.
- Use enum to choose a solver from the list.
- Use a central residual function used by all solvers. Where the objective function can cast types.
Last edit: 21 Feb 2025 13:04 by Grotius.
The following user(s) said Thank You: Aciera

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

More
21 Feb 2025 13:16 - 21 Feb 2025 13:43 #322202 by Aciera
Replied by Aciera on topic scurve trajectory planner

Why do the tranformations as used in the abstract?

Can't give you a definite answer to that but as long as we can't do it as described in the paper is seems a bit premature to want to modify the described method.

I see you have splitted up the gaus interpolation into x, y, z.


Well that's just a rough hack really that would need some streamlining but as long as nothing converges there is no point in polishing.
[edit]
And it looks like I have done it wrong having set ltot to 0
Last edit: 21 Feb 2025 13:43 by Aciera.
The following user(s) said Thank You: Grotius

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

  • FabianB
  • FabianB's Avatar
  • Away
  • New Member
  • New Member
More
21 Feb 2025 14:05 #322203 by FabianB
Replied by FabianB on topic scurve trajectory planner
Hi guys,

looks like you are making good progress. Short question regarding the single_clothoid_fit() are you only fitting the start and endpoint or are you also trying to match the curvature etc.?
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
  • Offline
  • Platinum Member
  • Platinum Member
More
21 Feb 2025 15:03 #322207 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Arciera,

The only motivation in the abstract is to align the normal n with the positive z axis direction.
The equatations for the math are already there.

- Added clothoid interpolation
- Added dynamic plot size

 

@Fabian,
looks like you are making good progress.
Yes. To be honest. I did not know we could do this at all. My math level is not that good.
The progress is fenominal. We now have at least a working solution.

We can now refine, polish code and add different solvers to the codebase. Arciera is hard
working to try out new non-linear solvers, wich are kind off trickie to set up.

The result is a G3 solution between previous and next gcode segment.
Indeed, it matches curvature.

Later on we can test more graphical in opencascade. Wich has also a great codebase
to do forward & inverse transformations.

And maybe, maybe i will code a bi-clothoid in the future. As a 4-clothoid can cause overfitting,
wich is inherent to higher degree curves.
Attachments:

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

Time to create page: 0.136 seconds
Powered by Kunena Forum