linuxcnc trajectory planner

More
16 Oct 2024 12:41 - 16 Oct 2024 12:41 #312253 by Lcvette
Replied by Lcvette on topic linuxcnc trajectory planner
awesome to see this active again!! glad you are ok and back at it 
Last edit: 16 Oct 2024 12:41 by Lcvette.
The following user(s) said Thank You: Grotius

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

More
16 Oct 2024 19:20 #312292 by Grotius
Replied by Grotius on topic linuxcnc trajectory planner
@Lcvette,

Thank you for your kind words !.

Had a weird experience. The scene was as follows.
1. Run linuxcnc with the "linuxcnc" splash gcode. Added G64 P1 to the top of gcode file. Then i pressed run.
2. Ok machine run's the file. In the background the traject optimizer was busy and a few moments later was ready.
3. Then load the produced file : ~/cmake/ "validate.ngc". into linuxcnc.
4. The gcode preview shows that "arcs" where converted to "lines". So how is this possible. Did i made a typo in the code?
5. Then i was reading online :

link
when the maximum deviation of an arc from a straight line is less than the G64 Q- tolerance, the arc is broken into two lines (from start of arc to midpoint, and from midpoint to end).

Conclusion for the test environment :
The interpreter had transformed the G2 & G3's into G1's. And the optimizer was then reading this false information.
So now to avoid this mismatch the files to blend are loaded with a empty G64 P, Q value, ensuring a valid input to the optimizer.

Then inside the optimizer the G64 P & Q values are set for now.

Ok, Then finally :

 

 

The vertical lines are for testing. It are spline control points. I had to visualize them to track the previous error.
Ok for now this is looking better.
Attachments:
The following user(s) said Thank You: akb1212, tommylight, Lcvette, Aciera, Darium

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

More
16 Oct 2024 20:09 #312296 by Lcvette
Replied by Lcvette on topic linuxcnc trajectory planner
nice! yeah not sure how to get around linuxcnc applying the G64 rules pre optimizer. may need something edited during initial load?
The following user(s) said Thank You: Grotius

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

More
16 Oct 2024 21:45 #312303 by Grotius
Replied by Grotius on topic linuxcnc trajectory planner
Hi Lcvette,

I didn't know linuxcnc would do this. When coding and testing i got my head scratched and thought : alien obstruction

not sure how to get around linuxcnc applying the G64 rules pre optimizer
Yes, indeed. We are screwed.

Tested this in top off a linuxcnc gcode file :
G64 P10 Motion blending tolerance
G61 Exact Path Mode
This then resolves the issue.

Wich means this is not applied :
when the maximum deviation of an arc from a straight line is less than the G64 Q- tolerance, the arc is broken into two lines (from start of arc to midpoint, and from midpoint to end).

Another error i was getting:
"same Y word..".
Cause, when running the "validation.ngc" file, when start is pressed, the file overwrites itself.
To avoid this, the filename now get a random number attached.

In the mean time, we learned a lot today.
 




 
Attachments:
The following user(s) said Thank You: akb1212, Lcvette, tiagounderground, Darium

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

More
17 Oct 2024 19:45 #312425 by robh
Replied by robh on topic linuxcnc trajectory planner
i have also noticed on my fanuc , mitsubishi machiens it seems when in a probe move there is no smoothing on any axis motion, its a much harder point to point move you can hear the differance on the machine axis when making prob moves onto a surface.
so dont think that the main stream controls use motion smoothing on probe moves as it seems they do not, when you are probiing it tends to not be that fast also, aprox 1000mm/min feed is common.
for the reasons mentioned before. as probining its key you always have a known probe detection trigger distance etc as this is what you calibrate a probe cycle for..

also
dont for get threading on lathes (G33 and g76) is another one you will skip for smoothing as it must follow the spindle encoder like tapping.
The following user(s) said Thank You: akb1212, Grotius

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

More
17 Oct 2024 21:42 #312431 by footpetaljones
At least for Fanuc, smoothing should be applied to probing moves, it not being applied means that the MTB didn't set the 6200 parameters as they should have and trapezoidal acceleration/deceleration is applied to skip moves vs bell curve acceleration/deceleration.
The following user(s) said Thank You: akb1212, Lcvette, Grotius

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

More
18 Oct 2024 11:39 #312497 by Grotius
Replied by Grotius on topic linuxcnc trajectory planner
Hi Rob,

But probing is just a straight line feed that triggers a sensor event? How is this related to smoothing?

Attached a validation gcode file. You could test this in linuxcnc. It's result of a G64 P20 Q0.
To visualize this, the fillets are drawn as G1 linestrip.

This was hard work, because what you see is a filletized path using clothoids.
To use them in 3d space, i had to add logic to project 3d planes to xy planes and back to do the clothoid calculations.

At one point in the original gcode file it sees a transition from arc on xy plane to a line that goes z up.
This is a situation where segments points are not all in the same plane.
This situation is then reverted to use a bspline.

So far no tiny segments are filtered out.

For the source code, Clothoids-1 is added. This cmakelists file has to be reviewed as it is quite a mess now.

The clothoids lib integration was quite a lot off alien obstruction. But at least is works now !

repository

 

 
Attachments:
The following user(s) said Thank You: akb1212, Aciera, Darium

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

More
18 Oct 2024 12:15 #312500 by Aciera
Replied by Aciera on topic linuxcnc trajectory planner
Just cloned your repo and tried to build linuxcnc. I get this error:
Compiling emc/task/emctask.cc
In file included from emc/motion/motion.h:75,
                 from emc/task/emctask.cc:36:
emc/motion/optimizer.h:9:10: fatal error: eigen3/Eigen/Dense: No such file or directory
    9 | #include "eigen3/Eigen/Dense"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:287: objects/emc/task/emctask.o] Error 1

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

More
18 Oct 2024 13:13 #312503 by Grotius
Replied by Grotius on topic linuxcnc trajectory planner
Hmm, ok.
Do you have the Eigen lib? : sudo apt-get install libeigen3-dev

In the next upload, there will be a check in the cmakelists for that.

So installing the clothoids-1 is for now a manual task. So it's annoying i know. I feel with you.
You can build the clothoids-1 in their own dir using a build dir. Then you can do a system wide: sudo make install.
Or copy the files over into the rtlib. Preferr to build the clothoids before the motion and planner.
I know this has to be changed soon.

Good luck. When spot install problems, let me know.

In the mean time i did some tests.
This are situations where the G64 P20 Q0 is used. Extreme situations to verify the blend algoritme for robustness.
Will show now a few pictures sets. Each set is before blending, and after blending with radius 20mm.
This are files using low dimensions so 20mm is just a incredible high value.

before:
 
after:
 

Here you can see the interpreter has given around 20.000 gcode lines. Not the entire file.
Therefore you see the buffered output is filletized as a result. When this then is machined, the next
load will occur.

before:
 
after:
 

before:
 
after:
 

 
Attachments:
The following user(s) said Thank You: akb1212, Lcvette, Aciera

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

More
18 Oct 2024 13:50 - 18 Oct 2024 13:52 #312512 by Aciera
Replied by Aciera on topic linuxcnc trajectory planner
Ok, installing 'libeigen3-dev' solved that error.

So this next error would come from not having compiled/installed the 'clothoids-1'?
user@user-iMac:~/linuxcnc_trajectory_planner/cmake/build$ cmake ..
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
CMake Error at motion/CMakeLists.txt:49 (ADD_LIBRARY):
Cannot find source file:

/home/user/linuxcnc_trajectory_planner/cmake/simpline/simpline/Simpline.h

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at motion/CMakeLists.txt:49 (ADD_LIBRARY):
No SOURCES given to target: motmod


CMake Generate step failed. Build files cannot be regenerated correctly.
 
Last edit: 18 Oct 2024 13:52 by Aciera.
The following user(s) said Thank You: Lcvette, Grotius

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

Time to create page: 0.266 seconds
Powered by Kunena Forum