Trajectory Planner using Ruckig Lib
11 Jun 2024 13:37 #302822
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@Abhishek,
Currently you can not run it. You have to wait until i have tested new codebase.
This can take day's to weeks. We don't know at the moment.
Currently you can not run it. You have to wait until i have tested new codebase.
This can take day's to weeks. We don't know at the moment.
The following user(s) said Thank You: akg1904
Please Log in or Create an account to join the conversation.
11 Jun 2024 20:28 - 11 Jun 2024 20:30 #302848
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
Sample gcode :
Interpreter output:
Then tomorrow GENERAL_MOTION() will print values.
Now the interpreter part is almost done. The sai test program works ok finally.
Some notes to get this working :
This was a hard day off coding !! Hopely tomorrow straight to the finish line where we have to add code to the
realtime part of linuxcnc up to the trajectory planner.
Sample gcode :
Warning: Spoiler!
G0 X0 Y0 (rapid move)
F10 (set feed rate)
G9 X11 Y22 Z33 P0.1 Q0.2 R44.5 L321 E123.33 (L=integer type)
M30
Interpreter output:
Warning: Spoiler!
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
2 N..... SET_G5X_OFFSET(1, -nan, -nan, -nan, 0.0000, 0.0000, 0.0000)
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
4 N..... SET_XY_ROTATION(0.0000)
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
6 N..... ON_RESET()
Interp::read_g
Interp::execute_block
7 N..... COMMENT("rapid move")
Interp::convert_motion
8 N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, -nan, 0.0000, 0.0000, 0.0000)
Interp::execute_block
9 N..... COMMENT("set feed rate")
10 N..... SET_FEED_RATE(10.0000)
Interp::read_g
G9 found.
x:11
y:22
z:33
p:0.1
q:0.2
r:44.5
l:321
e:123.33
gmodes i:-1
gmodes i:90
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
gmodes i:-1
Interp::execute_block
11 N..... COMMENT("L=integer type")
Interp::convert_motion
12 N..... GENERAL_MOTION()
Interp::execute_block
13 N..... SET_G5X_OFFSET(1, -nan, -nan, -nan, 0.0000, 0.0000, 0.0000)
14 N..... SET_XY_ROTATION(0.0000)
15 N..... SET_FEED_MODE(0, 0)
16 N..... SET_FEED_RATE(0.0000)
17 N..... STOP_SPINDLE_TURNING(0)
18 N..... SET_SPINDLE_MODE(0 0.0000)
19 N..... PALLET_SHUTTLE()
20 N..... PROGRAM_END()
interpreter ready.
Then tomorrow GENERAL_MOTION() will print values.
Now the interpreter part is almost done. The sai test program works ok finally.
Some notes to get this working :
This was a hard day off coding !! Hopely tomorrow straight to the finish line where we have to add code to the
realtime part of linuxcnc up to the trajectory planner.
Attachments:
Last edit: 11 Jun 2024 20:30 by Grotius.
Please Log in or Create an account to join the conversation.
12 Jun 2024 21:25 #302906
by Becksvill
Replied by Becksvill on topic Trajectory Planner using Ruckig Lib
Awesome can't wait to test it
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
14 Jun 2024 14:19 #303009
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
The G9 is working. It is now running in the TPMOD from Rob Ellenberg.
It's showing a line, as i told the python part in lcnc to draw a line if it see's a G9.
Now the framework for a general motion is working!
Coding this, was not easy. But afterwards you can search for : GENERAL_MOTION and almost everything that
i coded into the source will appear.
To finalize it, i will also include I, J, K letters to pass into the G9. Extra variable letters already included are P,Q,R,L
The G9 is working. It is now running in the TPMOD from Rob Ellenberg.
It's showing a line, as i told the python part in lcnc to draw a line if it see's a G9.
Now the framework for a general motion is working!
Coding this, was not easy. But afterwards you can search for : GENERAL_MOTION and almost everything that
i coded into the source will appear.
To finalize it, i will also include I, J, K letters to pass into the G9. Extra variable letters already included are P,Q,R,L
Please Log in or Create an account to join the conversation.
14 Jun 2024 17:55 - 14 Jun 2024 18:05 #303014
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Up to date with lcnc master :
lcnc repo
Then we now we can think about how to use this GENERAL MOTION. G9. stuff.
It has a lot off values we can use : x,y,z,a,b,c,u,v,w,i,j,k,p,q,r,e,l.
Normally the L is of type integer.
They idea is to create gcode like :
E= is proposed to be a identifyer for line, arc, etc.
L= is proposed to be a indicator for startpoint, waypoint, endpoint.
P = tollerance for G64
Q = naive cam value for G64
E100.1 or E100.2 is also valid identifyer. Really no limits over here now !!
# 3d Line
G9 E1 X0 Y0 Z0 L0 (start)
G9 E1 X100, Y100, Z0, L1 (end)
# 3d Arc
G9 E2 X0 Y0 Z0 L0
G9 E2 X50, Y50, Z0, L1
G9 E2 X100, Y0, Z0, L2
# 3d Plane, set current plane
G9 E100 X0 Y0 Z0 L0 (plane point one)
G9 E100 X0 Y50 Z0 L1 (plane point two)
G9 E100 X50 Y0 Z0 L2 (plane point three)
# 3d Circle
(set 3d plane)
G9 E3 X0 Y0 Z0 L0 (start)
G9 E3 X50, Y50, Z0, L1 (center)
# 3d Spline
G9 E4 X0 Y0 Z0 L0
G9 E4 X50, Y50, Z0, L1
G9 E4 X100, Y0, Z0, L2
# 2d Tri-Clothoid in 3d space.
(set 3d plane)
G9 E5 X0 Y0 Z0, I0, J0, L0 (where I=start angle, J=curvature begin)
G9 E5 X50, Y50, Z0, I0, J0, L1 (where I=end angle, J=curvature end)
So, we can just push multiple gcode lines into one object. Here we have no limits.
If you have any idea. Great!
Sampe G9 gcode that is currently running in TPMOD.so component :
G9 updating values.
Then we now we can think about how to use this GENERAL MOTION. G9. stuff.
It has a lot off values we can use : x,y,z,a,b,c,u,v,w,i,j,k,p,q,r,e,l.
Normally the L is of type integer.
They idea is to create gcode like :
E= is proposed to be a identifyer for line, arc, etc.
L= is proposed to be a indicator for startpoint, waypoint, endpoint.
P = tollerance for G64
Q = naive cam value for G64
E100.1 or E100.2 is also valid identifyer. Really no limits over here now !!
# 3d Line
G9 E1 X0 Y0 Z0 L0 (start)
G9 E1 X100, Y100, Z0, L1 (end)
# 3d Arc
G9 E2 X0 Y0 Z0 L0
G9 E2 X50, Y50, Z0, L1
G9 E2 X100, Y0, Z0, L2
# 3d Plane, set current plane
G9 E100 X0 Y0 Z0 L0 (plane point one)
G9 E100 X0 Y50 Z0 L1 (plane point two)
G9 E100 X50 Y0 Z0 L2 (plane point three)
# 3d Circle
(set 3d plane)
G9 E3 X0 Y0 Z0 L0 (start)
G9 E3 X50, Y50, Z0, L1 (center)
# 3d Spline
G9 E4 X0 Y0 Z0 L0
G9 E4 X50, Y50, Z0, L1
G9 E4 X100, Y0, Z0, L2
# 2d Tri-Clothoid in 3d space.
(set 3d plane)
G9 E5 X0 Y0 Z0, I0, J0, L0 (where I=start angle, J=curvature begin)
G9 E5 X50, Y50, Z0, I0, J0, L1 (where I=end angle, J=curvature end)
So, we can just push multiple gcode lines into one object. Here we have no limits.
If you have any idea. Great!
Sampe G9 gcode that is currently running in TPMOD.so component :
Warning: Spoiler!
G0 X0 Y0 Z0
F500
G1 X10 Y10 Z10
G9 X0 Y0 Z0 P0 Q0 R0 E0 L0 I0 J0 K0
G9 X10 Y0 Z0 P1 Q10 R11 E12 L13 I100.0 J100.1 K100.5
G9 X0 Y0 Z0 P0 Q0 R0 E0 L0 I0 J0 K0
G9 X10 Y0 Z0 P1.1 Q10.2 R11.3 E15 L13 I10550.0 J100.6565 K100.98989
G9 X0 Y0 Z0 P0 Q0 R0 E0 L0
M30
G9 updating values.
Attachments:
Last edit: 14 Jun 2024 18:05 by Grotius. Reason: type errors
Please Log in or Create an account to join the conversation.
17 Jun 2024 14:11 #303179
by Lcvette
Replied by Lcvette on topic Trajectory Planner using Ruckig Lib
@Grotius
That is fantastic! you just let me know when you need some testers and I will carve out the time. also if there are any user buttons or anything that will be required for settings, please let me know so i can add them in Probe Basic! this is really great work! huge thank you!!
That is fantastic! you just let me know when you need some testers and I will carve out the time. also if there are any user buttons or anything that will be required for settings, please let me know so i can add them in Probe Basic! this is really great work! huge thank you!!
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
17 Jun 2024 19:47 #303197
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@Lcvette,
That is fantastic!
Thanks. It's a lot off work. And coding into the linuxcnc source is not easy.
I see Probe Basic is a python hmi for linuxcnc.
Today i was working on hal-core , This is a hal environment.
It has a c++ hmi that now runs the nist rs274ngc interpreter.
The interpreter misses a few gcode commands like G64. Will add them with the G9.
The idea is to code both projects together to the finish line : linuxcnc & halcore
Halcore has less code overload, uses no python, has no code forest, is compact & fast.
Halcore now reads the gcode file trough the rs274 interpreter and shows the results in opencascade :
Halcore has no Milltask component. So i will create one for it, But will name it different.
I have a question about gcode file from robh:
In the gcode there are arc's that start with z value, then the arc uses a different end z value.
Plane is xy. This arc is a spiral? I never used a spiral before, but in this case opencascade has to draw a spiral i suppose?
Also trajectory interpolation model for a arc spiral has to be made then.
That is fantastic! you just let me know when you need some testers and I will carve out the time.
It will take some time for the next test on the production machine will be done.
also if there are any user buttons or anything that will be required for settings,
I think this can be done if everything works ok.
That is fantastic!
Thanks. It's a lot off work. And coding into the linuxcnc source is not easy.
I see Probe Basic is a python hmi for linuxcnc.
Today i was working on hal-core , This is a hal environment.
It has a c++ hmi that now runs the nist rs274ngc interpreter.
The interpreter misses a few gcode commands like G64. Will add them with the G9.
The idea is to code both projects together to the finish line : linuxcnc & halcore
Halcore has less code overload, uses no python, has no code forest, is compact & fast.
Halcore now reads the gcode file trough the rs274 interpreter and shows the results in opencascade :
Halcore has no Milltask component. So i will create one for it, But will name it different.
I have a question about gcode file from robh:
In the gcode there are arc's that start with z value, then the arc uses a different end z value.
Plane is xy. This arc is a spiral? I never used a spiral before, but in this case opencascade has to draw a spiral i suppose?
Also trajectory interpolation model for a arc spiral has to be made then.
That is fantastic! you just let me know when you need some testers and I will carve out the time.
It will take some time for the next test on the production machine will be done.
also if there are any user buttons or anything that will be required for settings,
I think this can be done if everything works ok.
Attachments:
The following user(s) said Thank You: Lcvette
Please Log in or Create an account to join the conversation.
18 Jun 2024 03:23 #303221
by Lcvette
Replied by Lcvette on topic Trajectory Planner using Ruckig Lib
@Grotius do you mean similar to a boring operation where it's interpolation of xyz like a thread?
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
- ihavenofish
- Offline
- Platinum Member
-
Less
More
- Posts: 662
- Thank you received: 113
18 Jun 2024 04:16 #303223
by ihavenofish
Replied by ihavenofish on topic Trajectory Planner using Ruckig Lib
helical motion. g2/3 circle with a z component. normally you tell the post processor to turn that into lines cause not all controls handle helical motion.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
18 Jun 2024 09:34 #303238
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
Hi,
@Grotius do you mean similar to a boring operation where it's interpolation of xyz like a thread?
Yes.
In the linuxcnc axis gui it draws a spiral (i think). So normally you would not mention, he this is a spiral.
You see in the gcode line, there is a little z difference in the upfollowing arc move.
In my gui it draws a pure arc on xy plane. I did not expect to draw a spiral.
So this is a spiral?
If so, i have to check if the g2, g3 moves have a z difference.
This is not difficult, but i have to create a spiral in opencascade, and a interpolation model for a spiral.
@Grotius do you mean similar to a boring operation where it's interpolation of xyz like a thread?
Yes.
In the linuxcnc axis gui it draws a spiral (i think). So normally you would not mention, he this is a spiral.
You see in the gcode line, there is a little z difference in the upfollowing arc move.
In my gui it draws a pure arc on xy plane. I did not expect to draw a spiral.
So this is a spiral?
If so, i have to check if the g2, g3 moves have a z difference.
This is not difficult, but i have to create a spiral in opencascade, and a interpolation model for a spiral.
Attachments:
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.304 seconds