|
From: BsAtHome <no...@gi...> - 2026-09-17 12:50:10
|
Branch: refs/heads/master Home: https://github.com/LinuxCNC/linuxcnc Commit: c8a05beac77b438f49a3887aaccdb421cf6c1c32 https://github.com/LinuxCNC/linuxcnc/commit/c8a05beac77b438f49a3887aaccdb421cf6c1c32 Author: Luca Toniolo <107...@us...> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M src/emc/kinematics/trtfuncs.c Log Message: ----------- xyzbc-trt-kins: apply the direction sign to the offsets in the inverse The inverse turns the x and z offsets through the B tilt in the conventional sense, while the forward turns them in whichever sense the conventional-directions pin selects. With the pin false, which is the default, and any of x-offset, z-offset or tool-offset set, a pose does not survive the round trip: the position comes back out by twice sin(b) times the offset. xyzac has no term of this kind. Found by tests/kins-jacobian, which multiplies the derivative of the inverse by differences of the forward and expects the identity. Commit: 336054b23b855ec017181147ba7e10a3deb5e90d https://github.com/LinuxCNC/linuxcnc/commit/336054b23b855ec017181147ba7e10a3deb5e90d Author: Luca Toniolo <107...@us...> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M src/emc/kinematics/scarakins.c Log Message: ----------- scarakins: set the elbow flag for a negative elbow angle The forward sets the flag that makes the inverse negate its arc cosine when joint 1 is below 90 degrees, so for an elbow between 0 and 90 the inverse returns the other arm and the pose does not survive the round trip. The sign of the arc cosine is the sign of the elbow angle, so the test is against zero. Commit: cd07b56e21a75fc23069e497705c0ebad16e10c2 https://github.com/LinuxCNC/linuxcnc/commit/cd07b56e21a75fc23069e497705c0ebad16e10c2 Author: Luca Toniolo <107...@us...> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M src/emc/kinematics/pumakins.c M src/emc/kinematics/three21kins.c Log Message: ----------- pumakins, three21kins: compare the branch flags modulo a whole turn The forward decides the shoulder, elbow and wrist branches by comparing a joint angle with the value the inverse's formula gives, within a fuzz, and does not wrap the difference. A joint standing a whole turn from that value, which the differences of two atan2 results produce freely, fails the comparison and the inverse is sent down the other branch. The difference is brought into (-pi, pi] first. Commit: 4a3f7a2831e2232aac7371768ce1ed072c21b06d https://github.com/LinuxCNC/linuxcnc/commit/4a3f7a2831e2232aac7371768ce1ed072c21b06d Author: Luca Toniolo <107...@us...> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M src/hal/components/matrixkins.comp M src/hal/components/millturn.comp M src/hal/components/userkins.comp M src/hal/components/xyzab_tdr_kins.comp Log Message: ----------- userkins, millturn, matrixkins, xyzab_tdr_kins: set the kinematics pins up once, at load These four build their pins on the first kinematicsType() call behind an is_setup flag nothing sets, so every later call runs the setup again, reassigns haldata and fails to create pins already taken; motion asks twice when num_extrajoints is set. Move the setup to EXTRA_SETUP(), which halcompile runs once before the component is ready, as the two trsrn modules already do. The pins exist from load, kinematicsType() only answers, and the hal_set_unready()/hal_ready() dance goes with it. userkins is the template for out of tree modules, so its description says where the pins go. Commit: 77f4173c3684ea287abeb321a7bfa10e4b27c795 https://github.com/LinuxCNC/linuxcnc/commit/77f4173c3684ea287abeb321a7bfa10e4b27c795 Author: Luca Toniolo <107...@us...> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M src/emc/kinematics/maxkins.c A tests/maxkins/README A tests/maxkins/checkresult A tests/maxkins/core_sim.hal A tests/maxkins/test-ui.py A tests/maxkins/test.ini A tests/maxkins/test.sh A tests/maxkins/tool.tbl Log Message: ----------- maxkins: make the forward and the inverse describe the same machine Two faults left kinematicsForward and kinematicsInverse disagreeing whenever the head is tilted, and nothing in tree could show it: max5 is the only config that loads the module and it ships B_PIVOT_LENGTH = 0 with six joints, so the pivot to tip distance is zero and U, V and W never leave zero. The forward took the U axis apart into xv and zv and subtracted both from the position it reports, while the inverse added xv back and subtracted zv again: X inverted and Z did not, in the same function, the shape of a typo rather than of a convention. The inverse now adds zv back. The forward also rotated the table and saddle into the workpiece frame and then subtracted the B, U and V corrections from the result, so those landed in the rotated frame; the inverse un-rotates first and adds them back in the machine frame. The vismach model says which is right: max5gui builds the head as tool, spindle, head, brotary, zslide, column, and the workpiece separately as crotary, table, saddle, so the head hangs off the Z slide and does not turn with the C table. The corrections are machine frame, they apply before the rotation, and the inverse had it right. The forward now subtracts them from the joint values and rotates the sum. A sweep of 40000 random poses, pivot lengths to 300 and tool lengths to 37.5, round trips to 2.7e-13, against 666 mm before. Reported world coordinates move for anyone running maxkins with the head tilted and the table turned; they were wrong by that amount, and the DRO and the machine now agree. Nothing moves at C0, and nothing moves at all on the max5 sim. tests/maxkins drives the machine through poses with the pivot length, the tool length and each of B, C, U, V and W away from zero and compares the position that comes back with the one commanded: motion runs the inverse to turn the pose into joints and the forward to turn the joint feedback into a position, so a pose that survives the round trip is one the two directions agree on. Both settings of conventional-directions are covered. Against the old code the pose with B 40 and U 15 came back 19.284 mm out in Z, twice u sin(b), and the pose with B 40 and C 30 landed 10.765 mm out in X and 40.174 mm out in Y. Commit: 91dfff8f5ea8ef86c6603b6fc328add04d024bd9 https://github.com/LinuxCNC/linuxcnc/commit/91dfff8f5ea8ef86c6603b6fc328add04d024bd9 Author: Luca Toniolo <107...@us...> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M src/emc/motion/control.c A tests/kins-switch-unsolved/README A tests/kins-switch-unsolved/checkresult A tests/kins-switch-unsolved/sim.hal A tests/kins-switch-unsolved/test-ui.py A tests/kins-switch-unsolved/test.ini A tests/kins-switch-unsolved/test.sh A tests/kins-switch-unsolved/tool.tbl Log Message: ----------- motion: a kinematics switch whose forward cannot solve the joints is refused handle_kinematicsSwitch() switched the module, then ran the new forward kinematics on the joints and, when that failed, reported it and kept the position it knew. The module stayed in the new type, so from the next cycle the inverse ran the joints to wherever that kept position lands in the new kinematics: on the hexapod that is a jump of twenty units on every strut, with no move commanded. The joints are where they are, and a kinematics whose forward cannot solve them is not one the machine can run in from there. Switch the module back before anything else sees the new type, report which type is still in force, and abort as before. Nothing moves and a later switch is taken on its own merits. tests/kins-switch-unsolved loads the hexapod with identity first, homes at zero, asks for the hexapod and checks that the type, the joints and the position are all as they were, that the failure was reported, that a move afterwards follows the identity inverse and that a switch to the type in force is accepted. Commit: c30de0c568850bd16ebca9383b2d38b4eccba42a https://github.com/LinuxCNC/linuxcnc/commit/c30de0c568850bd16ebca9383b2d38b4eccba42a Author: BsAtHome <be...@va...> Date: 2026-09-17 (Thu, 17 Sep 2026) Changed paths: M src/emc/kinematics/maxkins.c M src/emc/kinematics/pumakins.c M src/emc/kinematics/scarakins.c M src/emc/kinematics/three21kins.c M src/emc/kinematics/trtfuncs.c M src/emc/motion/control.c M src/hal/components/matrixkins.comp M src/hal/components/millturn.comp M src/hal/components/userkins.comp M src/hal/components/xyzab_tdr_kins.comp A tests/kins-switch-unsolved/README A tests/kins-switch-unsolved/checkresult A tests/kins-switch-unsolved/sim.hal A tests/kins-switch-unsolved/test-ui.py A tests/kins-switch-unsolved/test.ini A tests/kins-switch-unsolved/test.sh A tests/kins-switch-unsolved/tool.tbl A tests/maxkins/README A tests/maxkins/checkresult A tests/maxkins/core_sim.hal A tests/maxkins/test-ui.py A tests/maxkins/test.ini A tests/maxkins/test.sh A tests/maxkins/tool.tbl Log Message: ----------- Merge pull request #4546 from grandixximo/kins-fixes kinematics: six fixes found by round-tripping every module Compare: https://github.com/LinuxCNC/linuxcnc/compare/c6e026126f09...c30de0c56885 To unsubscribe from these emails, change your notification settings at https://github.com/LinuxCNC/linuxcnc/settings/notifications |