LinuxCNC S-Curve Accelerations
I think that technically he is working on a modified trajectory planner, and probably keeping the existing interpreter.If I understood correctly, someone else tried the S-curve first and didn't make it to the end. Then you created a HAL component that allowed you to do S-curve movements and now you're making your own interpreter. It is so?
I am curious about the current status.
Please Log in or Create an account to join the conversation.
Andy is right. i was working on a modified trajectory planner.
It took me a lot of time to figur things out.
Last year i had it partially working, but i was not satisfied. And i stopped with working on it.
Mayor issue was that lcnc is running out of cyclus time. The different algo's take to much.
@ZZ912,
It's not a private project, code is on github.
@Beef,
How is your project status?
Please Log in or Create an account to join the conversation.
E.g. "pos->tran.x = (j[0] s-curve algo);"
Please Log in or Create an account to join the conversation.
Hm, not sure but basically you would be using a toolpath that has been generated on condition that the first derivative (velocity) is continuous and then you are just filtering the acceleration to make a new path that also satisfies the condition of having the second derivative continuous. Also you would be doing this in real time with zero look ahead. I don't think that is possible without considerable deviation from the part geometry but I'm no expert.I have another idea to make this a little easier. How about a custom Kinematic comp.
I've always though that this is a question of trajectory planning, which means: Jerk control is built into the _shape_ of the tool path like it is done in road building.
At the end of the day every toolpath run on a real machine is going to be jerk limited because no drive chain can accelerate instantly but if the toolpath has not been calculated with this in mind then there are going to be geometric errors because of this.
Please Log in or Create an account to join the conversation.
Note there is a thread about moving the trajectory planner to non-real time which may be of interest (If I recall correctly the code itself was unfortunately not shared):Mayor issue was that lcnc is running out of cyclus time. The different algo's take to much.
forum.linuxcnc.org/38-general-linuxcnc-q...time?start=10#263611
Please Log in or Create an account to join the conversation.
So I haven't been able to make much progress in the interim - I have competing demands with work and this is still a side-project for me. Not to mention it's a super complex problem to wrap your head around. To be honest I have absolutely no idea how you wrapped your head around it so quickly - I had a lot of respect for your work just reading the forum posts, and now that I see it firsthand I'm even more impressed with what you got working .
I was able to compile your existing code and get it to run but I wanted to be able to incorporate it into the existing LinuxCNC build system and make some changes to use a compiled Ruckig lib instead of the semi-custom library it appears you made.
The reason I want to try and use the compiled lib is that I also reached out to the Ruckig guys to see if they are willing to sell licenses for individuals/hobby use. I don't believe that the lookahead function will work without either some hacky workarounds such as adding extra axes and performing calculations incorporating those, so knowing whether or not this is an option would likely be helpful. I assume they will distribute precompiled binaries or something to that effect, which is why I want to try and rely on a compiled lib.
If they aren't willing to do individual licenses and there isn't a reliable way to make the lookahead function work, I may end up ditching the ruckig lib entirely and trying to incorporate one of the 3d printer S-curve trajectory planners instead to get it working for 3 axis stuff at least.
Please Log in or Create an account to join the conversation.
You are definitely more of an expert than me. And yes, we have an error in the geometry. But it depends very much on the time set. If you draw a straight line to the acceleration curve, the distance is the error. The question now is: do we always need a perfect system? Not in rapid feed and not in jog.basically you would be using a toolpath that has been generated on condition that the first derivative (velocity) is continuous and then you are just filtering the acceleration to make a new path that also satisfies the condition of having the second derivative continuous. Also you would be doing this in real time with zero look ahead. I don't think that is possible without considerable deviation from the part geometry but I'm no expert.
The idea of integrating trajectory planning into an S-curve is as ingenious as it is difficult. And great respect to try solving that. My idea was perhaps to approach the problem in small steps. Maybe then we can see whether the whole thing can be solved differently so that it isn't so complex.
Please Log in or Create an account to join the conversation.
The cmake project of my linuxcnc fork : github.com/grotius-cnc/linuxcnc/tree/main/cmake is still compiling.
I started the axis gui, scurve config by executing the runtest in directory : github.com/grotius-cnc/linuxcnc/blob/mai...onents/sc_tp/runtest
This is starting a axis gui, performing the scurve motion along the linuxcnc start screen letters.
An sich this works, but code is not finished. From here i could give it a fresh new try.
Please Log in or Create an account to join the conversation.
Do you use Discord or IRC? Since you're back I would rather assist you than to attempt re-structuring this on my own. I'm confident I can get a couple other people involved as well if you're interested in this, and with a few people working together perhaps we can solve this more effectively than each of us individually, especially since you're the one with the most familiarity with both the trajectory planner and with implementing the Ruckig lib that I know of.
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Offline
- Elite Member
- Posts: 238
- Thank you received: 37
UPD
I've added you to one of the projects. We'll need to discuss and go over the work that's been done and what needs to be accomplished. And, of course, assist each other
Please Log in or Create an account to join the conversation.