LinuxCNC S-Curve Accelerations

More
7 months 3 weeks ago #344154 by Becksvill
hey guys

just wondering whats the latest on this.

cheers

andrew

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

More
7 months 2 weeks ago - 7 months 2 weeks ago #344164 by grandixximo

hey guys

just wondering whats the latest on this.

cheers

andrew
 


Still work in progress

github.com/LinuxCNC/linuxcnc/pull/3807

you can read above, if anyone wants to test what's done so far, they can download the debs from github build artifacts
github.com/LinuxCNC/linuxcnc/actions/runs/22982518117?pr=3807
the above is today's build, scroll to the end of the page for the debs for the different systems, I think I got it to the point where it is in a good enough state for sim testing by the community
To test it set planner type 2, I have included a zip file in this post with my testing settings for planner type 2.
YangYang is refactoring the code, he put planner type 1 on pause because there are certain limitations with TP1 implementation, he cannot reach high speed on short segments.
TP2 will be the general base idea, but much needs to be refactored, the feed override needs to be reworked, kinematics TP and RT servo-thread need to be reworked, there is talk in the github about this, any extra mind is appreciated.
At the moment TP2 generally works, what's still missing from my implementation is spindle sync, I never tested probing or adaptive-feed.
as far as running gcodes and MDI, I believe everything works, but it is far from hardened, it is just me doing testing in a sim, if you put it on your machine, it is at your own risk, play with it in the sim, and let me know how it goes, here, in the gihub PR, or even on my github fork.
Last edit: 7 months 2 weeks ago by grandixximo.
The following user(s) said Thank You: akb1212, tommylight, MX_Master, yrsiddhapura, endian, Darium, NWE

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

More
7 months 2 weeks ago #344185 by endian
Hello, 

I can see merge of your progress to master? Am I right ?

Regards e.

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

More
7 months 2 weeks ago #344202 by automata
Hi grandixximo,
Congratulations on a viable solution to this long standing gap in Linuxcnc implementation.
I was going through how you have taken into account the kinematics in userspace for planning which is needed for kinematics bounds checking.
I also see that you have made the relevant changes in the kinematics defined in src/emc/kinematics/* files.
There is another set of switchable kinematics defined in the src/hal/components/*.comp files (method made viable by David Muller / aciera on this forum). For example xyzab_tdr_kins.comp, xyzacb_trsrn.comp etc.,
I somehow find the idea of implementing the kinematics as a loadable .comp module compiled by halcompile very fascinating and useful ;-)
Is there a guideline on how to transition those kinematics also to this new setup?
-automata
The following user(s) said Thank You: grandixximo, akb1212, tommylight, rodw, MX_Master, endian

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

More
7 months 2 weeks ago - 7 months 2 weeks ago #344236 by grandixximo

Hello, 

I can see merge of your progress to master? Am I right ?

Regards e.
 

No, we will make another PR for merging into master, this is more of a testing version, it was shared as a draft, it is good to get feedback on it, as it will be the base for the future work.
Last edit: 7 months 2 weeks ago by grandixximo.

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

More
7 months 2 weeks ago - 7 months 2 weeks ago #344243 by grandixximo

Hi grandixximo,
Congratulations on a viable solution to this long standing gap in Linuxcnc implementation.
I was going through how you have taken into account the kinematics in userspace for planning which is needed for kinematics bounds checking.
I also see that you have made the relevant changes in the kinematics defined in src/emc/kinematics/* files.
There is another set of switchable kinematics defined in the src/hal/components/*.comp files (method made viable by David Muller / aciera on this forum). For example xyzab_tdr_kins.comp, xyzacb_trsrn.comp etc.,
I somehow find the idea of implementing the kinematics as a loadable .comp module compiled by halcompile very fascinating and useful ;-)
Is there a guideline on how to transition those kinematics also to this new setup?
-automata
Hi automata,

Good question — the .comp-based kinematics (like xyzab_tdr_kins.comp, xyzacb_trsrn.comp, etc.) were missing planner type 2 support because halcompile doesn't generate the nonrt_attach() entry point or the shared-memory parameter bridge that the userspace planner needs.
I've added a glue header (comp_kins_uspace.h) that makes the conversion straightforward without having to rewrite the .comp as a hand-written .c file. The idea: HAL pin values are mirrored into shared memory by the RT module each servo cycle, and the userspace planner reads a consistent snapshot from there instead of touching HAL pins.
The conversion is 5 mechanical steps:

#include "comp_kins_uspace.h"

Call comp_kins_uspace_setup(comp_id, "mykins", num_joints, "XYZAB") in your setup function after hal_ready()

Replace each *(haldata->pin) with KINS_READ(haldata->pin, N) where N is a unique index per parameter

Bracket kinematicsForward/kinematicsInverse with COMP_KINS_BEGIN(haldata) / COMP_KINS_END()

Add COMP_KINS_NONRT_ATTACH("mykins") at the end of the file

For switchable kins, also sync the switch type with COMP_KINS_SET_SWITCH_TYPE() in kinematicsSwitch().
xyzab_tdr_kins.comp has been converted as a reference example — look for the lines marked with +++ comments. The kinematics docs (docs/src/motion/kinematics.adoc) now have a full section on this with annotated code examples.
Last edit: 7 months 2 weeks ago by grandixximo.
The following user(s) said Thank You: akb1212, rodw, zmrdko

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

Time to create page: 0.553 seconds
Powered by Kunena Forum