Trajectory Planner using Ruckig Lib

More
28 May 2024 19:23 #301702 by Grotius
@hmnijp,

Just readed the forum link you posted earlyer. So this guy Troy has working on it for 7 month's on the issue
and in the end the code is closed source.

Yes, this is required.
The beginning of the program is roughing. At the end is finishing, and the G64 parameters change accordingly. 

This sounds logical. I had never used this, because was working with sheet metal's and tubes and wooden plates.
So this is used by machine shop's that use a piece of iron that has to be shaped into a piece, from rough to finish.

Then we can look to edit the lcnc interpreter, that it can read more G64 [char] commands.


@Mr. Morley,
I think the problem is not starting the linuxcncsvr for the c++ app.
linuxcncsvr (488746) emcsvr: machine 'LinuxCNC-HAL-SIM-AXIS'  version '1.1'

Have to look what is missing here.

@Andrew,
Looked into your code. Well done!
Will look better at a quite moment.

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

More
28 May 2024 21:10 #301707 by Grotius
Hi,

Finally the c++ axis gui is running as stand alone app.

I did a few things to get it running as stand alone.

1.
Added a nml error channel :  
NML *err = new NML(emcFormat, "emcError", "xemc", EMC2_DEFAULT_NMLFILE);
We already had the command & status channel, i thought maybe it need a error channel too?

2.
Added a hal component to the gui. I thought maybe it needs this to run?
This idea was inspired by a historic tryout : github.com/grotius-cnc/qt_c_linuxcnc_interface_gui
void hal_connection(){
    int comp_id = hal_init("QT_C++_Interface");
    hal_comp_name(comp_id);
    hal_malloc(200);
    hal_ready(comp_id);
}

3.
Added the linuxcnc startup gcode to the gui.
std::string file;
file += EMC2_IMAGE_DIR;
file+="/share/axis/images/axis.ngc";
 nml->load(file);

Then it still didn't move. So i started ~/bin/./halshow and then used halui to home the machine.
And it worked. Then i could set the jog speed and it jogged x+.
So tommorow i will create some nice presettings for the c++ gui.

Now we can show the path optimalisation in opencascade.
This gui has the opencascade c++ gremlin gcode preview. This can show us everything we want.

So far so good ! Let's begin the real work now.

 
Attachments:
The following user(s) said Thank You: tommylight, Clive S, tivoi, hmnijp

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

More
29 May 2024 11:56 #301745 by Grotius
Hi,

I did a few presettings and it now starts ok.

This was a good practice. When i loaded lcevette's gcode file, it was loading about 150 lines. Not all the lines.
So the interpreter was waiting for "reset()", to dump more gcode lines. This now works.

And there was a tiny bug, related to no validation of gcode segments. So i added gcode validation that checks
if line has lenght, the circle is a circle and if it's an arc. Now i think less bug's may remain.

I need a volunteer !!!
Is someone willing to only make a gui with a designer? You don't have to have coding skills, only make the design.
It would be awesome if we can create high end controller gui's like fanuc, siemens, etc you name it.
But i need help. Eventually you may ask for public gifts yourself, In fact you did work.

So now the c++ app is running. We now can concentrate on the gui waypoints further on this day. To
look if we can do a point overlay test with some kind of curve.
Attachments:
The following user(s) said Thank You: tommylight, tivoi, Unlogic

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

More
29 May 2024 17:55 - 29 May 2024 17:56 #301759 by RDA

I need a volunteer !!!
Is someone willing to only make a gui with a designer? You don't have to have coding skills, only make the design.
It would be awesome if we can create high end controller gui's like fanuc, siemens, etc you name it.
But i need help. Eventually you may ask for public gifts yourself, In fact you did work.
 
 

 

I think first you should decide for what the GUI is for. Different machines being it a lathe, milling, plasma, laser or 3D printing require a different "style" GUI. I personally dont think you can have "the best" GUI that suits all the applications.

Then there is personal preference, some like things one way and some the other. Example, I dont know if you were serious, but I have always found the Fanuc GUI ugly and outdated. Don't get me wrong, I like Fanuc and they do excellent work, its just the GUI that for me is very off putting. Actually not entirely true, their Cobot sw was looking pretty nice, didn't play with that for more than a couple minutes though so I cant say if it was good, but it looked decent.
I personally like more "modern" looking stuff like Mazak, well maybe that a bit over the top but its completely different from Fanuc. TCI has a pretty nice GUI in their cutting machines, again something different from Mazak and Fanuc but I have always liked it.
Last edit: 29 May 2024 17:56 by RDA.
The following user(s) said Thank You: Grotius

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

More
29 May 2024 17:56 #301760 by grijalvap
What is your idea for the GUI may be i can help I always tought a C or C++ GUI should be more fluid than Python, may be I can help..
The following user(s) said Thank You: tivoi, Grotius, RDA

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

More
29 May 2024 20:02 #301771 by andrew2085
I've been trying to test the first algorithm in that bi-clothoid paper but have had problems. Equation 11 has k0 - ke as the denominator, so when the curvature of the shapes you're trying to join are equal, the equation breaks down. I was able to use sagemath to just find the limits of the equations that break down and use those instead in those situations. The equation also just seems to give bogus values for certain inputs, negative s1 or s2 which don't make sense. It seems like only one of the possible solutions to equations 7, 8, 9, and 10 for s1, s2, c1, c2 are given in the paper, but I was able to figure out what was missing with sagemath. It almost seems like it's working, the second and third iteration close in on the solution, but the fourth overshoots and generates negative inputs. I'm not sure if I'm just missing something about the implementation of the algorithm in the paper, or if you are expected to do more than what is shown.

maybe a fresh set of eyes can help see what's wrong.

Here's the test program:
colab.research.google.com/drive/1Gh6oU7h...YF4zEgFD?usp=sharing

PDF:
www.researchgate.net/publication/3246504...h_speed_CNC_machines
The following user(s) said Thank You: Grotius

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

More
29 May 2024 20:20 #301773 by Grotius
@RDA,

Volunteers can choose what they like. If you build one you like, you can use it with c++ under the hood.
I think you won't regret your effort. It's quite responsive.

@Grijalvap,

I have no idea what gui we should build. It's up to the designer, the one with the initiave to create something.
The c++ axis gui i build, is like a ugly copy of the axis gui.
For my personnaly i like to see a copycat gui of a excisting machine brand.

I have to be going on with the planner work. So designing and design's for gui's, windows, etc
has to be outsourced to volunteers.

Take some inspiration and build what you like. I will take care that c++ will work under the hood.
This c++ work is quite straighforward as we have nml command interface where almost all things can be done
to run the cnc.
Please use qt designer. A empty c++ project and start building the gui, sub windows etc.
For the opencascade gremlin viewer, add a frame.
For the gcode, also add a frame. So everything that is special will need a frame.

A offline fillet test, while program is running. Haha.









 

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

More
29 May 2024 20:45 - 29 May 2024 20:52 #301777 by Grotius
@Andrew,

Equation 11 has k0 - ke as the denominator, so when the curvature of the shapes you're trying to join are equal, the equation breaks down

if Ke-Ko=0 then result s1=0. But you know that yourself too.
I really have to dive in that to say something usefull.
Deep respect you are doing and have achieved so far.

I see equatation 9 is interesting related to Ko & Ke.

I was planning to test your scurve algo tomorrow.

Here is some chatgpt info about your issue, i just copy paste a piece of the science paper into chatgpt.

 
   
Attachments:
Last edit: 29 May 2024 20:52 by Grotius.

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

More
29 May 2024 22:12 #301780 by andrew2085
When I replace the Jacobian matrix stuff with this, it converges very slowly. I have no idea why yet.

 
Attachments:
The following user(s) said Thank You: Grotius

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

More
29 May 2024 23:15 - 30 May 2024 02:38 #301783 by andrew2085
Well I figured it out. It now converges in about 6 iterations. Maybe I just don't understand the notation from the paper, but that sure as hell doesn't look like its decrementing sBC and t2, it looks like its assigning. It was just a wild ass guess, but it was correct.

Changing from assignment to decrement:


From the paper:


Edit:
I asked ChatGPT: mathb.in/78746
I guess subtracting from the existing values is implied because that's whats normally done when doing this kind of operation with an inverse Jacobian. 
Attachments:
Last edit: 30 May 2024 02:38 by andrew2085.
The following user(s) said Thank You: tommylight, Grotius, spumco

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

Time to create page: 0.228 seconds
Powered by Kunena Forum