Trajectory Planner using Ruckig Lib

More
09 Nov 2023 21:26 #284974 by Grotius
@Joco,

So far touch off is not coded or tested by me.
The same for external offset's, rigrid tapping etc. All not coded yet.
We can focus on this later on, when the scurve is running properly.

The debian 12 on the vm, i can't get linuxcnc compiled the original way. I will try debian 11.
 

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

More
09 Nov 2023 21:27 #284975 by Joco
Ahhh ! Cool - thanks. Wont chase ghosts then. :)

Re debian 12 - I did that ok yesterday. What is the issue/error?

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

More
09 Nov 2023 22:36 #284986 by Joco
Test run on physical machine using the attached plasma wrench.

I had a look at the g code test file taht you have been using.  It wont "just run" on my physical machine as it has negative positions.  Normally I would move the wcs to cope but I can't so it wont let me run.  How was generated? If from DXF could I have that so I can regenerate a version with nothing flowing into the negatives?  Or is it programatic and easy to regenerate a version that stays in bounds?   My plasma has a work area of X=1200 and Y=600 (actually 1290x610 but for test purposes keeping it simple).  So a larger "stress" version of the file I can run across the whole space might be of use?

Also on feed rates - would it be possible to have the feeds for X/Y and Z set via two vars at the top of the file?  That makes it super easy to quickly adjust for different stress levels on the run.   If I have the source dxf or the generative prog I am happy to do that tweak.

File Attachment:

File Name: axis-scurv...ov24.txt
File Size:8 KB


File Attachment:

File Name: metric_wrench.ngc
File Size:1 KB


Cheers - J.
Attachments:

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

More
09 Nov 2023 23:28 #284992 by Joco

@Joco,

When the isnan occured, i suspect you did a mdi move for a given arc?
Do you remember the given gcode that caused the isnan? Thanks.




 

This might well have been solved. But he issue happened immediately after the completion of the first G0 in the wrench test file in my last post.  It did a rapid to the Hole locaiton in the file then stalled.

Cheers - J.

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

More
10 Nov 2023 00:24 #284993 by rodw
Must be. Its listed in your error file you attached here.

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

More
10 Nov 2023 02:23 #284997 by Joco
More testing.  I managed to come up with a way to get the standard gcode file @Grotius was using and it into a dxf that I could manipulate in sheetcam to fill out a larger area. Then generate back into gcode.
Test file in use:    

File Attachment:

File Name: gcode_test_jw.ngc
File Size:52 KB


I have run this file under standard tp in 2.9 and 2.10pre.  Works fine.

Under scurve it throws an error pretty much immediately.  Attached log has all the deails.
But here is the snippet for the relvant issue (I believe):
tpSetVlimit. to: 333.316667
line startpoint x: 625.000000, y: 300.000000, z: -25.000000
line endpoint x: 625.000000, y: 300.000000, z: -25.000000
line startpoint x: 190.000000, y: 162.000000, z: -25.000000
line endpoint x: 190.000000, y: 162.000000, z: -25.000000
line startpoint USRMOT: ERROR: invalid command
can't add circular move at line 21, error code -1
waiting for s.joints<0>, s.kinematics_type<0>

 

File Attachment:

File Name: axis-scurv...ov24.txt
File Size:6 KB


Cheers - J.
Attachments:

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

More
10 Nov 2023 05:51 #285001 by Grotius
Hi Joco,

Thanks for your detailled error report.
The gcode file is from cam repository : github.com/grotius-cnc/cam/blob/main/gcode.ngc

I added your modified gcode_test_jw.ngc to the source. And opened the file in axis. Then press run after home,
and error reproduced indeed.

tpAddCircle.
vector size: 6
lengt of this segment: -nan
traject lenght now: -nan
arc startpoint x: 192.000000, y: 162.000000, z: -1.500000
arc endpoint x: 192.000000, y: 162.000000, z: -1.500000
arc center x: 164.000200, y: 162.000000, z: -1.500000


It's obvious, the arc has the same start- & endpoint, wich results in a isnan output for arc lenght in this case.
So i can do 2 things here.
  1. Change it into a line when start & end are the same.
  2. Filter out this segment, trow it away

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

More
10 Nov 2023 06:16 #285002 by Joco
So line 21 is:   G03 X192.0000 Y162.0000 I-27.9998 J0.0000 F#<xy_feed>

This essentially a circle.  Use ncviewer.com/ to step through the code file.  Really useful to visualise what is happening where.

Are you factoring the fact the fact that the arc at this line is in fact a circle or is something happening under the hood which is causing this to happen as a result of what is being produced by the ruckig library?

Cheers - J

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

More
10 Nov 2023 06:23 #285003 by Grotius
The isnan is fixed by changing isnan to 0 output. So segment's are just there, segment lenght is set to zero.
To inform you where in the source this is done :

github.com/grotius-cnc/linuxcnc/blob/884.../tp/tp_lines.cpp#L89
github.com/grotius-cnc/linuxcnc/blob/884.../tp/tp_arcs.cpp#L233

Github is updated.

Joco, it seems the rapids are below the workpiece. But the file run's oke now.
You may edit the file yourself on github.
 
 
Attachments:

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

More
10 Nov 2023 06:27 - 10 Nov 2023 06:35 #285004 by Joco
Thanks - yeah its a hack as I can't set WCS to be able to have positive upward Z moves.

Normally Z would be removed on my plasma as that is all under plasmac control.  Once WCS can be set then will change.  OR is it ok to kill off Z moves entirley?  For the purposes of this test file.

J.
Last edit: 10 Nov 2023 06:35 by Joco.
The following user(s) said Thank You: Grotius

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

Time to create page: 0.228 seconds
Powered by Kunena Forum