- Posts: 238
- Thank you received: 0
LinuxCNC S-Curve Accelerations
- TheRoslyak
- Offline
- Elite Member
-
Is it possible to simple import this module in linuxcnc?
It need me for this topic forum.linuxcnc.org/27-driver-boards/4274...-with-stm32-or-esp32
Or can you say another way: How to smooth velocity?
Please Log in to join the conversation.
What do you thing about this way?
Attachment not found
Attachment not found
Please Log in to join the conversation.
- TheRoslyak
- Offline
- Elite Member
-
- Posts: 238
- Thank you received: 0
Can you share how you imported S-Curve Accelerations?
Looking at scope you did it.
Please Log in to join the conversation.
What you see on the scope is just the simplest case of jerk-limited motion: from stationary to stationary with a constant velocity part in between. There are much trickier cases that must work too for the code to be usable.
My code isn't finished yet. Since my last post I've fixed the bug I found during testing with the MPG (and another one), but there is still one corner case that I have to implement, and then integrate the resulting library with the LinuxCNC build system. I've had precious little "leftover energy" to spend on hobby programming lately, but the project is still moving forward, albeit *very* slowly at present.
Please Log in to join the conversation.
Nice work with the jerk limited motion.
I am very much interested in helping out and have decent experience in the linuxcnc codebase. ( I coded the original switch kins module to switch between multiple kinematics).
It you share your current branch which looks in good form, the community can move together to solve this long standing missing feature from one of the most flexible and open cnc software.
- automata
Please Log in to join the conversation.
Christian
Please Log in to join the conversation.
Thanks!automata wrote: Hi arvidb,
Nice work with the jerk limited motion.
I am very much interested in helping out and have decent experience in the linuxcnc codebase.
Did you download and compile/run the code that I've already published ? If not, that's a good place to start (for anyone who wants to help).
Please Log in to join the conversation.
Attachment not found
A bit more interesting than the last plot, don't you think?
There are still a few known bugs in the code, but it's nearing a state where testing might soon become meaningful!
Please Log in to join the conversation.
Hi Christian!chris@cnc wrote: hello arvidb hello automata, i would also help as far as i can. My approach would be a 2nd acceleration time in the ini that defines the curve. So we can easily decide whether linear or in s-curve. And the curve defines, for example, the sigmoid function. Some servo manufacturers go this route and it works very well. I have no idea how to start this. what do you think of this idea?
Christian
I think a great way to start would be to make your algorithm move a specified distance. Looking at your plot above, your algorithm moves from v = 0.0 to v = 1.0. Add a deceleration stage (from v = 1.0 to v = 0.0) and then scale peak velocity so that your algorithm ends up moving any distance that you specify as an input.
Then check that your peak velocity doesn't violate any "max velocity" (also specified as an input). If it does, insert a constant velocity segment.
Then make it work with initial velocity not zero.
And so on...
Please Log in to join the conversation.
Hi arvidb,arvidb wrote: . Add a deceleration stage (from v = 1.0 to v = 0.0) and then scale peak velocity so that your algorithm ends up moving any distance that you specify as an input.
You're right. It's a good idea to climb down the hill.
Maybe someone else can make something of it. I can not...
Attachment not found
Attachment not found
Please Log in to join the conversation.
