Trajectory Planner using Ruckig Lib
30 May 2024 14:33 #301848
by automata
Replied by automata on topic Trajectory Planner using Ruckig Lib
@Grotius and @Andrew2085
Awesome work.
Some of the parameters used by Delta controllers for high speed machining can be found in the NC300 manual.
deltronics.ru/images/manual/CNC_Milling-...M_MM_EN_20210630.pdf
Parameters for path modification / blending Page 12-5, 12-6 (pg 306): Param 329, 330, 331, 332, 333
Parameters for feedrate modification Page 12-4 (pg 305): Param 309, 311, 319, 320, 321, 322
This may point the way.
Regards,
automata
Awesome work.
Some of the parameters used by Delta controllers for high speed machining can be found in the NC300 manual.
deltronics.ru/images/manual/CNC_Milling-...M_MM_EN_20210630.pdf
Parameters for path modification / blending Page 12-5, 12-6 (pg 306): Param 329, 330, 331, 332, 333
Parameters for feedrate modification Page 12-4 (pg 305): Param 309, 311, 319, 320, 321, 322
This may point the way.
Regards,
automata
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
30 May 2024 15:08 - 30 May 2024 19:38 #301850
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
I'm going to convert the bi-clothoid stuff I've tested so far into C++. I tested using Gaussian quadrature in Python to numerically integrate the clothoid. It's seems unreasonably fast and unreasonably accurate to the point that it seems like magic. Evaluating the derivative at only 5 points is giving an integral with an error of around 1e-11 to 1e-17.
Edit:
Here is the start of it: github.com/a-downing/clothoid
Edit:
Here is the start of it: github.com/a-downing/clothoid
Last edit: 30 May 2024 19:38 by andrew2085.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
30 May 2024 20:27 #301885
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@Andrew,
Amazing work so far !.
I cloned the scurvy lib today. It is to be compiled c++ 23.
I use up to c20. For some reason i could not resolve to
get it c23 compiled. Looking for updating the compiler, but was newest version.
Then i could convert the println functions to printf. But there where also other c23 function that where more
complicated to convert.
Is it possible to convert to c20 or lower? This should be perfect.
Now going to look at the clothoid lib. Maybe i have questions later on. Thanks so far.
Evaluating the derivative at only 5 points is giving an integral with an error of around 1e-11 to 1e-17.
This is perfect. < 1e-6 is acceptable.
Another question.
I tested 2 nurb libs today. One of them was only 2d and very slow.
The other was OpenNurbs , this one is also very fast. And did a good job for 3d.
So i could create the 7 controlpoint example in opencascade. This works ok.
The question is, if i want to make a nurb with 100 waypoints for example. I don't know how the knot
vector should look like. Maybe i have to look further to understand how to build a nurb going over all the
gcode lines.
I was able to dynamicly load the points, load the knot vector. But the result was not ok.
Maybe you have experience with it?
Amazing work so far !.
I cloned the scurvy lib today. It is to be compiled c++ 23.
I use up to c20. For some reason i could not resolve to
get it c23 compiled. Looking for updating the compiler, but was newest version.
Then i could convert the println functions to printf. But there where also other c23 function that where more
complicated to convert.
Is it possible to convert to c20 or lower? This should be perfect.
Now going to look at the clothoid lib. Maybe i have questions later on. Thanks so far.
Evaluating the derivative at only 5 points is giving an integral with an error of around 1e-11 to 1e-17.
This is perfect. < 1e-6 is acceptable.
Another question.
I tested 2 nurb libs today. One of them was only 2d and very slow.
The other was OpenNurbs , this one is also very fast. And did a good job for 3d.
So i could create the 7 controlpoint example in opencascade. This works ok.
The question is, if i want to make a nurb with 100 waypoints for example. I don't know how the knot
vector should look like. Maybe i have to look further to understand how to build a nurb going over all the
gcode lines.
I was able to dynamicly load the points, load the knot vector. But the result was not ok.
Maybe you have experience with it?
Please Log in or Create an account to join the conversation.
30 May 2024 20:39 #301886
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@Andrew,
The biclothoid lib runs now. Will try to get visual output in opencascade from your main file example.
The biclothoid lib runs now. Will try to get visual output in opencascade from your main file example.
The following user(s) said Thank You: tivoi
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
30 May 2024 21:00 #301887
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
I think the only c++23 feature I used besides std::println is std::expected, you should only need to change a couple lines to just return the value directly. It's in scurvy::solve in scurvy.h. I don't really need them, they're just convinient to use to do fast work. On systems with old gcc versions I usually just compile the latest version of gcc and install to /opt.
I just added a Line class to the clothoid project and pushed to github. This is technically right, but its also wrong. Hopefully I just overlooked something.
I just added a Line class to the clothoid project and pushed to github. This is technically right, but its also wrong. Hopefully I just overlooked something.
Attachments:
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
30 May 2024 21:37 #301892
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi Andrew,
Will look tomorrow if i can fix the scurvy.
The clothoid lib compiles in qt. However loaded into the lcnc project. It has problems with c23.
So i can make first shared lib of the clothoid lib and then just link it.
Will look tomorrow if i can fix the scurvy.
The clothoid lib compiles in qt. However loaded into the lcnc project. It has problems with c23.
So i can make first shared lib of the clothoid lib and then just link it.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
31 May 2024 04:16 #301921
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
Attachments:
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
31 May 2024 12:00 #301943
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi Andrew,
I just added a Line class to the clothoid project and pushed to github. This is technically right, but its also wrong. Hopefully I just overlooked something.
I have seen this behaviour before using a spline lib in opencascade a few year ago.
When corners become tight, the spline used that solution.
Nice you found the solution to normalize it to be a max of 2*M_PI.
The clothoid library now works along the linuxcnc program.
The clothoid source code is now in the linuxcnc vendor dir:
clothoid_andrew
To make it myself easy i have brought all your code into a source file.
If you make any modifications, i just have to copy, paste code.
Then your code is in class clothoid_intf, This interface will be used to make your arc & line shapes
compatible with the linuxcnc arc & line primitives. A little bit of shape conversion code will appear there.
This is your test example using a line and arc, creating a clothoid fillet. It works perfect !
So far so good ! Now let's try to get the scurvy going.
I just added a Line class to the clothoid project and pushed to github. This is technically right, but its also wrong. Hopefully I just overlooked something.
I have seen this behaviour before using a spline lib in opencascade a few year ago.
When corners become tight, the spline used that solution.
Nice you found the solution to normalize it to be a max of 2*M_PI.
The clothoid library now works along the linuxcnc program.
The clothoid source code is now in the linuxcnc vendor dir:
clothoid_andrew
To make it myself easy i have brought all your code into a source file.
If you make any modifications, i just have to copy, paste code.
Then your code is in class clothoid_intf, This interface will be used to make your arc & line shapes
compatible with the linuxcnc arc & line primitives. A little bit of shape conversion code will appear there.
This is your test example using a line and arc, creating a clothoid fillet. It works perfect !
So far so good ! Now let's try to get the scurvy going.
Attachments:
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
31 May 2024 13:05 #301948
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
I can take the c++23 stuff out of scurvy now. I should probably also add some notes to the readme on how to use it. Also I'm not sure if you noticed or not, but currently it only solves one s-curve given the constraints, it doesn't try to do more. I figured the task of joining multiple segments together with matching end and beginning velocities should be handled one level of abstraction higher.
For the clothoid stuff I need to look into the part where the maximum deviation from the path is calculated.
For the clothoid stuff I need to look into the part where the maximum deviation from the path is calculated.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
31 May 2024 13:11 #301950
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi Andrew,
The scurvy lib compiles now. It's a little strange, it won't compile to executable, but will compile to shared lib.
I only commented out the println's. Will finish it later on this day.
Also I'm not sure if you noticed or not, but currently it only solves one s-curve given the constraints,
No, not noticed. Have to run the example later on this day. I am curious fur sure !.
For the clothoid stuff I need to look into the part where the maximum deviation from the path is calculated.
Ok. This is the intersection point of the 2 segments to the closest clothoid fillet point i guess?
Take your time. I will have work to do, to get the clothoid interface fertig.
Thanks so far.
The scurvy lib compiles now. It's a little strange, it won't compile to executable, but will compile to shared lib.
I only commented out the println's. Will finish it later on this day.
Also I'm not sure if you noticed or not, but currently it only solves one s-curve given the constraints,
No, not noticed. Have to run the example later on this day. I am curious fur sure !.
For the clothoid stuff I need to look into the part where the maximum deviation from the path is calculated.
Ok. This is the intersection point of the 2 segments to the closest clothoid fillet point i guess?
Take your time. I will have work to do, to get the clothoid interface fertig.
Thanks so far.
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds