Skip to content

docs: add a kinematics conventions chapter - #4454

Closed
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:kins-conventions
Closed

docs: add a kinematics conventions chapter#4454
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:kins-conventions

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

A kinematics module reports the controlled point and nothing else, so everything that needs the rest of the machine geometry rebuilds it. For xyzacb-trsrn the same chain is written three times: closed-form in xyzacb_trsrn.comp, as homogeneous matrices in the config's remap_funcs_twp.py, and as signed HalRotate calls in the vismach model. The only thing keeping them in step is a comment in the Python saying its matrices "must be the same as the ones used to derive the kinematic model".

This adds a chapter writing down the vocabulary those three would need to share, so a second module can be written from the same drawing and give the same answers:

  • the four frames, and that kinematicsForward() reports in the workpiece-attached one;
  • the rotation sense, which is the one already stated under Rotational Axes in the G-code manual and is ISO 841's tool-relative-to-workpiece convention;
  • what conventional-directions costs at its default of false, including that the rotary values come back as raw joint values while the translations in the same call use the flipped sign, so the returned pose does not describe its own orientation;
  • the tool frame: tool z from tip towards holder, and tool x parallel to the machine xy-plane by default.

Tool x is stated as a rule rather than a formula on purpose. A five-axis machine cannot set rotation about the tool axis, so a virtual rotation supplies it, and the formula for the default follows from that machine's own secondary rotation matrix. The two nutating configs in tree have different formulas for that reason alone. Applying either to the other machine gives a frame turned a quarter turn, with the tool still pointing where it was asked to point, and nothing in tree would catch it.

Docs only. Also anchors the Rotational Axes section so it can be referenced.

Part of the multiaxis kinematics work in #4374, item 3. Independent of the rest of it.

@grandixximo
grandixximo force-pushed the kins-conventions branch 2 times, most recently from 5726b8f to 6c4521d Compare August 23, 2026 06:14
@grandixximo
grandixximo marked this pull request as draft August 23, 2026 06:32
A kinematics module reports the controlled point and nothing else, so
everything needing the rest of the machine geometry rebuilds it.  For
xyzacb-trsrn the same chain is written three times: closed-form in
xyzacb_trsrn.comp, as homogeneous matrices in the config's
remap_funcs_twp.py, and as signed HalRotate calls in the vismach model.  The
Python copy is kept in step by a comment saying its matrices "must be the
same as the ones used to derive the kinematic model".

Write down the vocabulary they would need to share: the four frames and which
one kinematicsForward() reports in, the rotation sense already stated under
Rotational Axes and its ISO 841 equivalent, what conventional-directions
costs at its default, and the definition of the tool frame.

Tool x is the part worth stating as a rule rather than a formula.  The
virtual rotation about tool z supplies what a five-axis machine cannot, and
the convention is that it leaves tool x parallel to the machine xy-plane; the
formula follows from the machine's own secondary rotation matrix, which is
why the two nutating configs in tree have different ones.

Also anchor the Rotational Axes section so it can be referenced.
@grandixximo

Copy link
Copy Markdown
Contributor Author

Superseded by #4455, which carries this chapter together with the entry point it describes. The chapter names kinematicsToolFrame and TOOL_FRAME_FLANGE, so on its own it would have documented an API the tree does not have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant