Trajectory Planner using Ruckig Lib
11 Feb 2024 23:23 #293113
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
I have looked into the trajectory planner again. The code is quite well done so far. A nice starting point to go
on with coding.
There are several trajectory planners made so far.
The " scurve_skynet " i think is the nicest to go on with.
The plan is to integrate a linear & scurve motion planner into the trajectory planner.
This is my latest linear motion library, " linear_motion " wich is now loaded into the trajectory planner at
this line.
For calculating arc speeds, the idea is to use the "angular_motion " library. The angular motion is loaded into
the the trajectory planner at this line.
I hope within a few day's i can present a new scurve_motion libary.
I have looked into the trajectory planner again. The code is quite well done so far. A nice starting point to go
on with coding.
There are several trajectory planners made so far.
The " scurve_skynet " i think is the nicest to go on with.
The plan is to integrate a linear & scurve motion planner into the trajectory planner.
This is my latest linear motion library, " linear_motion " wich is now loaded into the trajectory planner at
this line.
For calculating arc speeds, the idea is to use the "angular_motion " library. The angular motion is loaded into
the the trajectory planner at this line.
I hope within a few day's i can present a new scurve_motion libary.
The following user(s) said Thank You: akb1212, tommylight, tivoi, Joco, yrsiddhapura, Ritterchen, RDA, tiagounderground, anton610, zmrdko and 1 other people also said thanks.
Please Log in or Create an account to join the conversation.
23 Feb 2024 14:33 #294078
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
To update my latest post : I hope within a few day's i can present a new scurve_motion libary.
I have been coding for a while now, coding a new scurve library in c.
The first part is working is now.
This includes the jog part for Linuxcnc.
When user press the jog button, the joint or
axis starts to move, when jog button is released, the jog will slow down and stop.
In the lcnc source i also solved a jogging bug in axis.
This scurve library uses only "jerk-max" to specify the s-curvature part.
In relation to the Ruckig library, this library uses a linear acceleration stage between the convex and concave curve
parts when needed.
In this video we show the scurve velocity when jog button is pressed or released.
I hope you like it so far.
I have been coding for a while now, coding a new scurve library in c.
The first part is working is now.
This includes the jog part for Linuxcnc.
When user press the jog button, the joint or
axis starts to move, when jog button is released, the jog will slow down and stop.
In the lcnc source i also solved a jogging bug in axis.
This scurve library uses only "jerk-max" to specify the s-curvature part.
In relation to the Ruckig library, this library uses a linear acceleration stage between the convex and concave curve
parts when needed.
In this video we show the scurve velocity when jog button is pressed or released.
I hope you like it so far.
The following user(s) said Thank You: akb1212, tommylight, pommen, rodw, Shu, yrsiddhapura, DHeineck, tiagounderground, Alexandrion, routerman22 and 3 other people also said thanks.
Please Log in or Create an account to join the conversation.
- routerman22
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 8
25 Feb 2024 14:04 #294361
by routerman22
Replied by routerman22 on topic Trajectory Planner using Ruckig Lib
I just want to let you know that this work is really appreciated <3
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
26 Feb 2024 14:07 #294521
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi Routerman,
Thanks for your kind words !
The jogging of a scurve is quite complex, you can find out in the source code.
It took a lot of time and disipline, but for now i am satisfied.
At this moment the jog library is working more or less ok.
Todo is jog step, like jog 1mm, or jog 10mm etc. This you can select in the axis gui.
In linuxcnc this is just jogging to "pos_cmd" and stop there with end velocity zero.
Video shows jogging forward & reverse, and how multipe button presses are being processed as jog interupts.
The scurve-jog project on github includes a c & c++ inplementation. The c part is for linuxcnc.
You can play with the scurve-jog-plot to show the jog curve in a qt realtime plot
Now i will test the jog source code in linuxcnc, and see what the scope displays.
Next update here will be about the linuxcnc scurve jog test.
Thanks for your kind words !
The jogging of a scurve is quite complex, you can find out in the source code.
It took a lot of time and disipline, but for now i am satisfied.
At this moment the jog library is working more or less ok.
Todo is jog step, like jog 1mm, or jog 10mm etc. This you can select in the axis gui.
In linuxcnc this is just jogging to "pos_cmd" and stop there with end velocity zero.
Video shows jogging forward & reverse, and how multipe button presses are being processed as jog interupts.
The scurve-jog project on github includes a c & c++ inplementation. The c part is for linuxcnc.
You can play with the scurve-jog-plot to show the jog curve in a qt realtime plot
Now i will test the jog source code in linuxcnc, and see what the scope displays.
Next update here will be about the linuxcnc scurve jog test.
The following user(s) said Thank You: akb1212, tommylight, tivoi, yrsiddhapura, DHeineck, routerman22, zmrdko, Unlogic
Please Log in or Create an account to join the conversation.
09 Mar 2024 18:32 #295531
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
It took a long time, but finally the scurve jog library works for linuxcnc including jog-step.
Jog-step is to move a certain distance each button press.
Therefore the scurve library needed a position & velocity control mode.
Next i will try to compare the difference in time performance between the ruckig and scurve library.
This is always nice to know.
It is still possible to select ruckig or scurve in the source code here.
github.com/grotius-cnc/scurve_construct/
Later on in the video the jog-step is shown.
It took a long time, but finally the scurve jog library works for linuxcnc including jog-step.
Jog-step is to move a certain distance each button press.
Therefore the scurve library needed a position & velocity control mode.
Next i will try to compare the difference in time performance between the ruckig and scurve library.
This is always nice to know.
It is still possible to select ruckig or scurve in the source code here.
github.com/grotius-cnc/scurve_construct/
Later on in the video the jog-step is shown.
Please Log in or Create an account to join the conversation.
09 Mar 2024 20:26 #295536
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
When jogging in linuxcnc, we logged the time for both ruckig and grotius-scurve in 2 sessions.
Grotius-scurve session:
Function duration: 10329 nanoseconds
Function duration: 2194 nanoseconds
Function duration: 2515 nanoseconds
Function duration: 6766 nanoseconds
Function duration: 1884 nanoseconds
Function duration: 1764 nanoseconds
Function duration: 5985 nanoseconds
Function duration: 2053 nanoseconds
Function duration: 1823 nanoseconds
Function duration: 8252 nanoseconds
Function duration: 1510 nanoseconds
Function duration: 1358 nanoseconds
Ruckig session:
Function duration: 21779 nanoseconds
Function duration: 9161 nanoseconds
Function duration: 10252 nanoseconds
Function duration: 20288 nanoseconds
Function duration: 8817 nanoseconds
Function duration: 10302 nanoseconds
Function duration: 52762 nanoseconds
Function duration: 42609 nanoseconds
Function duration: 32094 nanoseconds
Function duration: 24196 nanoseconds
Function duration: 41582 nanoseconds
Function duration: 32464 nanoseconds
Function duration: 45580 nanoseconds
This is good news.
Also the grotius-scurve is in principle a more powerfull scurve wich includes a linear acceleration stage between
the concave & convex curvatures, where the ruckig curve is like a spline with no linear stages possible.
Next thing to do is integrate the grotius-scurve into the linuxcnc motion planner.
The first integration is without any look ahead. Where the motion starts and stops every gcode line.
When this is working, we will work on the look ahead, and test the angular motion "arc" speeds.
So far so good.
Grotius-scurve session:
Function duration: 10329 nanoseconds
Function duration: 2194 nanoseconds
Function duration: 2515 nanoseconds
Function duration: 6766 nanoseconds
Function duration: 1884 nanoseconds
Function duration: 1764 nanoseconds
Function duration: 5985 nanoseconds
Function duration: 2053 nanoseconds
Function duration: 1823 nanoseconds
Function duration: 8252 nanoseconds
Function duration: 1510 nanoseconds
Function duration: 1358 nanoseconds
Ruckig session:
Function duration: 21779 nanoseconds
Function duration: 9161 nanoseconds
Function duration: 10252 nanoseconds
Function duration: 20288 nanoseconds
Function duration: 8817 nanoseconds
Function duration: 10302 nanoseconds
Function duration: 52762 nanoseconds
Function duration: 42609 nanoseconds
Function duration: 32094 nanoseconds
Function duration: 24196 nanoseconds
Function duration: 41582 nanoseconds
Function duration: 32464 nanoseconds
Function duration: 45580 nanoseconds
This is good news.
Also the grotius-scurve is in principle a more powerfull scurve wich includes a linear acceleration stage between
the concave & convex curvatures, where the ruckig curve is like a spline with no linear stages possible.
Next thing to do is integrate the grotius-scurve into the linuxcnc motion planner.
The first integration is without any look ahead. Where the motion starts and stops every gcode line.
When this is working, we will work on the look ahead, and test the angular motion "arc" speeds.
So far so good.
The following user(s) said Thank You: akb1212, tommylight, tivoi, pommen, MX_Master, yrsiddhapura, DHeineck, spumco, Alexandrion, Unlogic
Please Log in or Create an account to join the conversation.
- yrsiddhapura
- Offline
- Premium Member
Less
More
- Posts: 131
- Thank you received: 5
10 Mar 2024 17:35 #295592
by yrsiddhapura
Replied by yrsiddhapura on topic Trajectory Planner using Ruckig Lib
Bravo you just unstoppable cheers to you ......
The following user(s) said Thank You: tommylight, Grotius
Please Log in or Create an account to join the conversation.
- routerman22
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 8
10 Mar 2024 21:11 #295600
by routerman22
Replied by routerman22 on topic Trajectory Planner using Ruckig Lib
Grotius the MVP . I dont know about others, but i would be happy to donate to the further development of s curve in the motion planner.
The following user(s) said Thank You: tommylight, Grotius
Please Log in or Create an account to join the conversation.
11 Mar 2024 15:51 #295646
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi Routerman,
I hope Tommylight can open a "non profit" bank account in Kosovo for forum donations.
It will certainly help to cover the forum costs, server costs, forum day's.
I hope Tommylight can open a "non profit" bank account in Kosovo for forum donations.
It will certainly help to cover the forum costs, server costs, forum day's.
Please Log in or Create an account to join the conversation.
11 Mar 2024 20:26 #295677
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
A little update.
I already cleaned up the trajectory planner code, and can start from a clean code template.
Parts of the code is still there. Only the motion part has to be renewed.
Today i added end velocity to the scurve library. Without this each motion should end to zero velocity.
This end velocity option can be used in the trajectory planner's look
ahead function involving path rules. Some gcode motion transitions may contain a end velocity.
Attached a test video that run's a few motion commands using a velocity end value.
It's important given a end position and a end velocity, the motion finishes there.
A little update.
I already cleaned up the trajectory planner code, and can start from a clean code template.
Parts of the code is still there. Only the motion part has to be renewed.
Today i added end velocity to the scurve library. Without this each motion should end to zero velocity.
This end velocity option can be used in the trajectory planner's look
ahead function involving path rules. Some gcode motion transitions may contain a end velocity.
Attached a test video that run's a few motion commands using a velocity end value.
It's important given a end position and a end velocity, the motion finishes there.
Please Log in or Create an account to join the conversation.
Time to create page: 0.309 seconds