Trajectory Planner using Ruckig Lib
28 May 2024 19:23 #301702
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@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.
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.
28 May 2024 21:10 #301707
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
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 :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
3.
Added the linuxcnc startup gcode to the gui.
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.
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);
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:
Please Log in or Create an account to join the conversation.
29 May 2024 11:56 #301745
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
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.
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.
Please Log in or Create an account to join the conversation.
29 May 2024 17:55 - 29 May 2024 17:56 #301759
by RDA
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.
Replied by RDA on topic Trajectory Planner using Ruckig Lib
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.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.
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.
29 May 2024 17:56 #301760
by grijalvap
Replied by grijalvap on topic Trajectory Planner using Ruckig Lib
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..
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
29 May 2024 20:02 #301771
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
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
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
Please Log in or Create an account to join the conversation.
29 May 2024 20:20 #301773
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@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.
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.
29 May 2024 20:45 - 29 May 2024 20:52 #301777
by Grotius
Replied by Grotius on topic Trajectory Planner using Ruckig Lib
@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.
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.
The following user(s) said Thank You: akb1212
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
29 May 2024 22:12 #301780
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
Attachments:
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
- andrew2085
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 40
29 May 2024 23:15 - 30 May 2024 02:38 #301783
by andrew2085
Replied by andrew2085 on topic Trajectory Planner using Ruckig Lib
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.
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.
Please Log in or Create an account to join the conversation.
Time to create page: 0.239 seconds