scurve trajectory planner
- FabianB
-
- Away
- New Member
-
- Posts: 11
- Thank you received: 13
Please Log in or Create an account to join the conversation.
- FabianB
-
- Away
- New Member
-
- Posts: 11
- Thank you received: 13
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.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 704
- Thank you received: 125
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
Please Log in or Create an account to join the conversation.
- Grotius
-
Topic Author
- Away
- Platinum Member
-
- Posts: 2312
- Thank you received: 2090
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.
Please Log in or Create an account to join the conversation.
- FabianB
-
- Away
- New Member
-
- Posts: 11
- Thank you received: 13
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.
Please Log in or Create an account to join the conversation.
- Grotius
-
Topic Author
- Away
- Platinum Member
-
- Posts: 2312
- Thank you received: 2090
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:
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 704
- Thank you received: 125
Please Log in or Create an account to join the conversation.
- FabianB
-
- Away
- New Member
-
- Posts: 11
- Thank you received: 13
The second derivative is not the curvature, the first one is.Then x~``traj(s0) for example :
- This is second derivate = curvature, given the ``
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 already transfomed, given the ~ above the x
yes- Is for startpoint s0.
- Is for x coordinate.
No, it is the second derivative with respect to curve length s, this is not the same thing as curvature (would be first derivative)- It is the curvature kappa value for the transformed startpos?
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.- 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?
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
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:
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
- 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)
Please Log in or Create an account to join the conversation.