Switching kinematics methods must be done in a way
that preserves all joint.N.motor-pos-cmd values in
order to avoid a bump (and a likely following
error for a servo system).
I've made an experimental branch using a simple XYZ
kins module (altkins.c) to demonstrate switching
kinematics via a halpin (which could be controlled
by a user M command).
The branch dgarr/alternate_kins is based on the
current master branch with joints-axes updates.
The buildbot will make debs for this 'scratch'
branch for a limited number of days.
Ref:
buildbot.linuxcnc.org
The branch can be built from git:
$ cd your_git_top_dir_for_LinuxCNC
$ git fetch
$ git co dgarr/alternate_kins
$ source scripts/rip-environment
$ cd src; make && sudo make setuid
$ cd ../configs/sim/axis/
$ linuxcnc altkins.ini
It seems to work and may serve as a starting point
for more complex kinematics.
(i have not tested on hardware)
Branch ref:
github.com/LinuxCNC/linuxcnc/commits/dgarr/alternate_kins
Usage info:
github.com/LinuxCNC/linuxcnc/blob/dgarr/...sim/axis/altkins.txt