-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switchkins with External Offsets Causes Discontinuity #3207
Comments
Could you share what you have come up with so far? |
Here is my proposal for how to fix this more permanently, however, I have only ever worked on this one linuxcnc machine so I am not sure if this will cause issues for other machines. in Here is what I think this would fix:
If this sounds like a good solution, I will make a PR for these changes. |
The original author of the switchable kinematics feature has retired from the project. Given the lack of personnel you will not likely get a review based on a rough outline of a fix. The best way forward would be for you to implement the fix you are thinking and once tested create a pull request. |
I have a scara machine controlled by linuxcnc, used for plasma cutting. I use external offsets for THC, probing, and setting the height during a cut. This has worked well until I started using switchkins for rapid moves, now I have a failure with the Z axis.
Here is the issue, based on my understanding from reading the code, I could be missing something:
When running in one kinematics mode, there is the "axis" height, which the TP sees, then the external offset, which to my understanding is only seen by the motmod. Normally, in the
do_forward_kins
function, the forward and inverse kinematics are run on the total position, then the offsets are applied after, the TP sees the position after offsets are applied.However, when the kinematics are switched, in
handle_kinematicsSwitch
, thetpSetPos
function is run to sync up the TP with the state of the machine. However, this does not also clear the external offsets, so immediately after this is done, the motion planner will try to apply the offsets to the new position which already includes these offsets. I have a hack in my code to clear the offset immediately after the switch, but there is still a brief moment where the machine will either dive or raise up unexpectedly.Here are the steps I follow to reproduce the issue:
This is what I expected to happen:
I would expect the offsets to either be cleared to reflect the fact that the offsets are accounted for in the TP, or not have the synchronization happen.
This is what happened instead:
The offsets are added into the TP, but not cleared in motmod, so there is a double count of the external offsets.
Information about my hardware and software:
lsb_release -a
):Debian 11 Bullseye
uname -a
):6.1.35-rt11-v8+ SMP PREEMPT_RT
scripts/get-version-from-git
):2.9.0~pre0
Custom - N/A
Rpi compute, N/A
The text was updated successfully, but these errors were encountered: