scurve trajectory planner

  • FabianB
  • FabianB's Avatar
  • Away
  • New Member
  • New Member
More
12 Feb 2025 13:30 #321339 by FabianB
Replied by FabianB on topic scurve trajectory planner
like Aciera said. tilde means the object is in the transformed coordinate system and the numbers of ' show the order of the derivative in respect to curve lengths s. In this case they are from the boundary condition trajectories (lines or arcs) so you get the expression from multiplying equation (26) or (27) with the transformation matrix. Well 26 is easy as 0 stays 0.

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

  • FabianB
  • FabianB's Avatar
  • Away
  • New Member
  • New Member
More
12 Feb 2025 13:35 #321340 by FabianB
Replied by FabianB on topic scurve trajectory planner
Regarding the Frego paper, only the closed form solution needs to start from the straight line, the numerical calculation works for all cases.
However, the paper only gives the recipe how to calculate a 3D clothoid given the starting values. It does not explain how to fit 2 or more of them together to connect 2 points in space with given start and end conditions. So the new paper is the way to go as it also explains this part.
The following user(s) said Thank You: Grotius

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

More
12 Feb 2025 14:55 #321344 by smc.collins
Replied by smc.collins on topic scurve trajectory planner
I have been loosely following this for sometime and, I have a sincere question. Would this not be better implemented as a analog NN ?

This problem is difficult to solve because the calculations are based in lots of heavy math and splines where in essence we are attempting to create a plot of points in a 3d cloud. But that's not really optimal in reality.

I wonder could a NN be created to replicate the function of a analog calculator like a Tidal machine that can take the various inputs of a spline, end point, curvature etc and then it would produce via analog calculation the correct output ? Sure seems like it would be a far better solution.

en.wikipedia.org/wiki/Tide-predicting_machine
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
12 Feb 2025 15:42 #321347 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Fabian,

Most of the math of Frego is already inside the 2d clothoid library.
There it solves the clothoid G2 problem using 3 connected clothoids.
As later on discussed on github, adding the z component to the xy was proposed by using the Frego 3d paper.

The new paper is for me more understandable.

I have noticed in the new paper, that the 2 gcode segments are transformed to a null plane first.

This same approach i used before when we construct a clothoid when 2 gcode segments share same plane.

Then the 2 gcode segments in 3d space are transformed to xy plane, clothoid is build in xy plane, clothoid + gcode segments are
transformed back to original 3d space position. This worked flawless.

So this part of the paper, we can almost skip. As we know the mathematics for it.

Attached a few files where i tried to implement paper equatations. They may contain wrong approaches.

For now i am stuck at eq.40.

@Collins,
Maybe this is the same as starting with a bspline from segment a to segment b. Then manipulate the spline trajectory
to get a G2 result and apply a clothoid property like
"a curve whose curvature changes linearly with its curve length"

I cannot say anything about your analog predicion machine, as i can't imagine how to appy it to our work.

 
Attachments:

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

  • FabianB
  • FabianB's Avatar
  • Away
  • New Member
  • New Member
More
12 Feb 2025 17:04 #321355 by FabianB
Replied by FabianB on topic scurve trajectory planner
Hi Grotius,

where are you stuck with equation 40? the thetas you already have from the prev equation (39) and the tilded x" y" z" are the transformed derivatives of the starting and end points. If we connect with lines they are all 0 eq. (26). With arcs they are given by eq. (30) + transformation.
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
12 Feb 2025 20:16 - 12 Feb 2025 20:17 #321377 by Grotius
Replied by Grotius on topic scurve trajectory planner
@Fabian,

Thanks for your responce.

To me it looks like eq. 40 is all about k, kappa (curvature).

Then x~``traj(s0) for example :
- This is second derivate = curvature, given the ``
- Is already transfomed, given the ~ above the x
- Is for startpoint s0.
- Is for x coordinate.

- It is the curvature kappa value for the transformed startpos?

- I now get it, that a line has no curvature, so value is : 0
- So for a arc, we just put in the curvature value like : "1/Radius" normally.  But they use eq.30 :   -1/r*cos(s/r).....etc.... Why so difficult?



I did a little play around. Nothing seriously.
We can use this little program also to validate other curves.

Setup:
2 red lines, lenght 100mm, are connected by a clothoid at xy ground plane.
The lines have a offset 100mm.
After drawing the clothoid, we know the clothoid total length.

Test:
For the first line we lift the startpoint off the plane, given the z value.
For the second line we lift the endpoint off the plane, given the -z value.
Then both lines are out off plane, they don't share any plane anymore.

Still we are able to project a clothoid on the groundplane.
In the second picture the z value of one end of the line is already z219 and z-219.

On the ground plane i projected the red 2 lines, given the yz plane. (side view)
between the 2 lines is the clothoid lenght for xy. So clothoid is streched out to straight line.
Then another algo growns the xy lenght until the 3d clothoid ends are colinear to the red lines in 3d.

 
 
 
 
Attachments:
Last edit: 12 Feb 2025 20:17 by Grotius.
The following user(s) said Thank You: tommylight, Aciera

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

More
12 Feb 2025 23:44 - 12 Feb 2025 23:45 #321396 by smc.collins
Replied by smc.collins on topic scurve trajectory planner
That kind of math isn't something i have worked with in years and years and years lol. My broader point was that, maybe it is worth looking to build a NN that's not super big , but it might be faster and more efficient. Particularly if it can be run in using a GPU compute model , but it needs to be a very small and tight NN, it can't be a huge model. Just a narrow implementation that can handle the calculations from the weights.
Last edit: 12 Feb 2025 23:45 by smc.collins.
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
13 Feb 2025 07:51 #321422 by FabianB
Replied by FabianB on topic scurve trajectory planner

Then x~``traj(s0) for example :
- This is second derivate = curvature, given the ``
 

The second derivative is not the curvature, the first one is.

- Is already transfomed, given the ~ above the x
 

This means you need to enter the value of the already transformed trajectory. If we want to use eq. 30 for this we need to transform it first because there it is given before the transformation.

- Is for startpoint s0.
- Is for x coordinate.
 

yes

- It is the curvature kappa value for the transformed startpos?
 

No, it is the second derivative with respect to curve length s, this is not the same thing as curvature (would be first derivative)

- I now get it, that a line has no curvature, so value is : 0
- So for a arc, we just put in the curvature value like : "1/Radius" normally.  But they use eq.30 :   -1/r*cos(s/r).....etc.... Why so difficult?
 

For the line all derivatives are 0. For the arc see above, ti is not the curvature but the second derivative, not sure if it has a name, "curvature of the curvature" basically.
The following user(s) said Thank You: Grotius

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

More
13 Feb 2025 09:10 - 13 Feb 2025 09:21 #321427 by Aciera
Replied by Aciera on topic scurve trajectory planner
@FabianB
Now you are confusing me:

The second derivative is not the curvature, the first one is.

No, it is the second derivative with respect to curve length s, this is not the same thing as curvature (would be first derivative)


If I recall correctly the first derivative is the tangent angle (ie the slope) and the second derivative is curvature.

For the line all derivatives are 0


The first derivative of a line represents the slope which is a constant but not necessarily zero.
 
 
Attachments:
Last edit: 13 Feb 2025 09:21 by Aciera.
The following user(s) said Thank You: Grotius

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

More
13 Feb 2025 09:29 #321428 by Aciera
Replied by Aciera on topic scurve trajectory planner
@Grotius

- It is the curvature kappa value for the transformed startpos?


In my opinion, yes.
First we do the coordinate transformation then we need to match the boundary conditions which are tangent angle (theta), curvature (kappa) and sharpness (c)
The following user(s) said Thank You: Grotius

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

Time to create page: 0.138 seconds
Powered by Kunena Forum