KINS(9)
okay bestie, sit down, hydrate, because this is KINS(9) from the Kinematics Modules part of the LinuxCNC manual and it is a lot β but in a good way. It's the whole β¨ kins roster β¨: every kinematics component LinuxCNC ships, what each one does, and every knob you can turn on them. Part 1 energy only, more is coming, so don't go anywhere. π«Ά
β¨ NAME β¨
kins β kinematics definitions for LinuxCNC
For additional information, see the Documents 'Advanced Topics':
- Kinematics
- 5-Axis Kinematics
- Switchable Kinematics
π SYNOPSIS π
loadrt trivkins (use for most cartesian machines)
loadrt corexykins
loadrt genhexkins
loadrt genserkins
loadrt lineardeltakins (see separate manpage)
loadrt maxkins
loadrt pentakins
loadrt pumakins
loadrt rosekins
loadrt rotarydeltakins
loadrt rotatekins
loadrt scarakins
loadrt tripodkins
loadrt xyzab_tdr_kins
loadrt xyzac-trt-kins
loadrt xyzbc-trt-kins
loadrt 5axiskins
π DESCRIPTION π
So here's the tea, bestie: instead of exporting HAL pins and functions like a normal component, these guys hand LinuxCNC the forward and inverse kinematics definitions. That's their whole job. That's the vibe. π
π trivkins β generalized trivial kinematics
Joint numbers get assigned sequentially, following the axis letters you list in the coordinates= parameter. Simple as that, no drama.
If you just... don't pass coordinates= at all, then joint numbers get handed out sequentially to every axis letter LinuxCNC knows about: "xyzabcuvw".
Example: loadrt trivkins
Assigns all axis letters to joint numbers in sequence:
x==joint0, y==joint1, z==joint2
a==joint3, b==joint4, c==joint5
u==joint6, v==joint7, w==joint8
Example: loadrt trivkins coordinates=xyz Assigns: x==joint0, y==joint1, z==joint2
Example: loadrt trivkins coordinates=xz Assigns: x==joint0, z==joint1
Example: loadrt trivkins coordinates=xyzy Assigns: x==joint0, y0==joint1, z==joint2, y1==joint3
The default kinematics type is KINEMATICS_IDENTITY. GUIs are allowed to roll out special features for configs that use this default type. Like, the AXIS GUI will just handle joint mode and world mode operations for you, so the operator never even sees the difference between joints and axes β iconic behaviour, honestly. And it's totally feasible because there's an exact correspondence between a joint number and its matching axis letter. π―
You set the kinematics type with the kinstype= parameter:
kinstype=1 for KINEMATICS_IDENTITY (default if kinstype= omitted)
kinstype=[b|B] for KINEMATICS_BOTH
kinstype=[f|F] for KINEMATICS_FORWARD_ONLY
kinstype=[i|I] for KINEMATICS_INVERSE_ONLY
Example: loadrt trivkins coordinates=xyz kinstype=b
Use kinstype=B (KINEMATICS_BOTH) for configurations that need to move joints independently (joint mode) or as coordinated (teleop) movements in world coordinates. Both. She contains multitudes. β¨
When you're using the axis gui with KINEMATICS_BOTH, the '$' key toggles between joint mode and teleop (world) mode. Periodt.
An axis letter can show up more than once (duplicated!) to assign multiple joints to a single axis coordinate letter.
Example: coordinates=xyyzw kinstype=B Assigns: x==joint0, y==joint1 AND joint2, z==joint3, w==joint4
That example right there is a gantry configuration β the duplicated coordinate letters are saying "hey, two joints (joint1 and joint2) are moving one single axis (y)". Using kinstype=B lets the config toggle between joint and world modes of operation. There are Homing configuration options that let you synchronize the final homing move for selected joints β see the documentation for Homing Configuration. π
NOTES for duplicated coordinates:
When duplicated coordinate letters are in play, specifying KINEMATICS_BOTH (kinstype=B) lets a gui support jogging of each individual joint in joint mode.
β οΈ Caution is required for machines where moving a single joint (in a set defined by a duplicated coordinate letter) can lead to gantry racking or other unwanted outcomes. Not cute. Not slay.
When the kinstype= parameter is omitted, operation defaults to KINEMATICS_IDENTITY (kinstype=1), and a gui may allow jogging based on a selected axis coordinate letter (or by a keyboard key) before homing is completed and the machine is still in joint mode. The joint that gets selected depends on the gui implementation, but typically only one of the multiple joints in the set will jog. So like β specifying KINEMATICS_BOTH is recommended, because it enables support for unambiguous, independent jogging of each individual joint. π
Machines that implement homing for all joints (including the provisions for synchronizing the final homing move for multiple joints) may be homed at machine startup and automatically switch to world mode, where per-coordinate jogging is available. Main character homing arc. π
π corexykins β CoreXY Kinematics
X = 0.5*(JOINT_0 + JOINT_1)
Y = 0.5*(JOINT_0 - JOINT_1)
Z = JOINT_2
[KINS]JOINTS= must specify 3 or more joints (maximum 9). No negotiating.
If it's enabled by the number of [KINS]JOINTS= you specified, then JOINT_3,4,5,6,7,8 correspond to coordinates A,B,C,U,V,W respectively. π¦
π genhexkins β Hexapod Kinematics
Gives you six degrees of freedom in position and orientation (XYZABC). The location of base and platform joints is defined by HAL parameters. The forward kinematics iteration is controlled by HAL pins. (See switchkins documentation for more info)
genhexkins.base.N.xgenhexkins.base.N.ygenhexkins.base.N.zgenhexkins.platform.N.xgenhexkins.platform.N.ygenhexkins.platform.N.zβ Parameters describing the Nth joint's coordinates.genhexkins.spindle-offsetβ Added to all joints Z coordinates to change the machine origin. Facilitates adjusting spindle position.genhexkins.base-n.N.xgenhexkins.base-n.N.ygenhexkins.base-n.N.zgenhexkins.platform-n.N.xgenhexkins.platform-n.N.ygenhexkins.platform-n.N.zβ Parameters describing unit vectors of Nth joint's axis. Used to calculate strut length correction for cardanic joints and non-captive actuators.genhexkins.screw-leadβ Lead of strut actuator screw, positive for the right-handed thread. Default is 0 (strut length correction disabled).genhexkins.correction.Nβ Current values of strut length correction for non-captive actuators with cardanic joints.genhexkins.convergence-criterionβ Minimum error value that ends iterations with converged solution.genhexkins.limit-iterationsβ Limit of iterations, if exceeded iterations stop with no convergence.genhexkins.max-errorβ Maximum error value, if exceeded iterations stop with no convergence.genhexkins.last-iterationsβ Number of iterations spent for the last forward kinematics solution.genhexkins.max-iterationsβ Maximum number of iterations spent for a converged solution during current session.genhexkins.tool-offsetβ TCP offset from platform origin along Z to implement RTCP function.
π«Ά To avoid joints jump, change tool offset only when the platform is not tilted.
π genserkins β generalized serial kinematics
Kinematics that can model a general serial-link manipulator with up to 6 angular joints. (See switchkins documentation for more info)
The kinematics use Denavit-Hartenberg definition for the joint and links. The DH definitions are the ones used by John J Craig in "Introduction to Robotics: Mechanics and Control". The parameters for the manipulator are defined by HAL pins. Note that this uses a convention sometimes known as "Modified DH Parameters" and this must be borne in mind when setting up the system. https://w.wiki/NcY
genserkins.A-Ngenserkins.ALPHA-Ngenserkins.D-Nβ Parameters describing the Nth joint's geometry.
π maxkins β 5-axis kinematics example
Kinematics for Chris Radek's tabletop 5 axis mill named 'max', with a tilting head (B axis) and a horizintal rotary mounted to the table (C axis). Provides UVW motion in the rotated coordinate system. The source file, maxkins.c, may be a useful starting point for other 5-axis systems. π
π pentakins β Pentapod Kinematics
Gives five degrees of freedom in position and orientation (XYZAB). The location of base and effector joints is defined by HAL parameters. The forward kinematics iteration is controlled by HAL pins.
pentakins.base.N.xpentakins.base.N.ypentakins.base.N.zpentakins.effector.N.rpentakins.effector.N.zβ Parameters describing the Nth effector joint's radius and axial position.pentakins.convergence-criterionβ Minimum error value that ends iterations with converged solution.pentakins.limit-iterationsβ Limit of iterations, if exceeded iterations stop with no convergence.pentakins.max-errorβ Maximum error value, if exceeded iterations stop with no convergence.pentakins.last-iterationsβ Number of iterations spent for the last forward kinematics solution.pentakins.max-iterationsβ Maximum number of iterations spent for a converged solution during current session.pentakins.tool-offsetβ TCP offset from effector origin along Z to implement RTCP function.
π«Ά To avoid joints jump, change tool offset only when the platform is not tilted.
π pumakins β kinematics for puma typed robots
Kinematics for a puma-style robot with 6 joints.
pumakins.A2pumakins.A3pumakins.D3pumakins.D4β Describe the geometry of the robot.
π rosekins β kinematics for a rose engine using
a transverse, longitudinal, and rotary joint (3 joints). πΈ
π rotarydeltakins β kinematics for a rotary delta machine
Rotary delta robot (3 Joints). β¨
π rotatekins β Rotated Kinematics
The X and Y axes are rotated 45 degrees compared to the joints 0 and 1. That's it, that's the whole vibe. π
π scarakins β kinematics for SCARA-type robots
(See switchkins documentation for more info)
scarakins.D1β Vertical distance from the ground plane to the center of the inner arm.scarakins.D2β Horizontal distance betweenjoint[0]axis andjoint[1]axis, ie. the length of the inner arm.scarakins.D3β Vertical distance from the center of the inner arm to the center of the outer arm. May be positive or negative depending on the structure of the robot.scarakins.D4β Horizontal distance betweenjoint[1]axis andjoint[2]axis, ie. the length of the outer arm.scarakins.D5β Vertical distance from the end effector to the tooltip. Positive means the tooltip is lower than the end effector, and is the normal case.scarakins.D6β Horizontal distance from the centerline of the end effector (and the joints 2 and 3 axis) and the tooltip. Zero means the tooltip is on the centerline. Non-zero values should be positive, if negative they introduce a 180 degree offset on the value ofjoint[3]. π
bestie we're only partway through the kins lore, so hold that thought β part 2 is coming and it's gonna be just as much. π
π¦ tripodkins β Tripod Kinematics π¦
okay so the whole vibe here: the joints represent the distance of the controlled point from three predefined locations β those locations are the motors, bestie β and that hands you three degrees of freedom in position (XYZ). that's it, that's the kinematic β¨
and the motor spots are configurable through these three:
tripodkins.Bxtripodkins.Cxtripodkins.Cy
the location of the three motors is (0,0), (Bx,0), and (Cx,Cy). no cap, that's the entire layout π
πΈ xyzac-trt-kins β 5 Axis mill (Table Rotary/Tilting) πΈ
it's giving tilting table (A) plus a horizontal rotary mounted to the table (C axis), and it's a 5 joint situation: 0:x, 1:y, 2:z, 3:a, 4:c. it comes with provisions to switch between the xyzac and trivkins kinematic types π«Ά
you can alter the joint mapping with the coordinates parameter, in exactly the same way trivkins supports it. (see the switchkins documentation for more info β iykyk π)
π xyzbc-trt-kins β 5 Axis mill (Table Rotary/Tilting) π
same energy, different letters: 5 Joints 0:x, 1:y, 2:z, 3:b, 4:c, with provisions to switch between the xyzbc and trivkins kinematic types. joint mapping is alterable with the coordinates parameter, same way trivkins supports it. (switchkins documentation has the tea, go sip it π)
π 5axiskins β 5 Axis bridge mill π
XYZBCW β so the W coordinate values (typically used for tool motion, fr fr) get incorporated into XYZ positioning. heads up tho: only 5 joints are needed by the kinematics module, but an additional joint is needed to display W values. (yes, switchkins documentation again, it's iconic)
by default, 5axiskins uses coordinates XYZBCW assigned consecutively to joints 0..5. the module coordinates parameter may be used to:
- assign multiple joints to an axis letter, and/or
- assign joints to additional coordinates
A,U,Vwith a one-to-one correspondence to the assigned joints
Example: XYZBCWYV (8 joints total numbered 0..7) uses two joints for Y (joints 1,6) and adds an additional coordinate V that has a one-to-one relation to joint 7. ate and left no crumbs β
Note: these kinematics may be used with the vismach5axisgui, providing that the joint-letter assignments agree with the default ordering expected by it (XYZBCW-> joints0..5). don't freeball the order, bestie, it will not slay π
β¨ SEE ALSO β¨
- Kinematics section in the LinuxCNC documentation π
- The HAL component
userkins.compis a template for making kinematic modules using thehalcompiletool. the unmodified template supports an identityxyzconfiguration that uses3joints. seeuserkins(9)for more info π§
and that's the whole page, babe β LinuxCNC Documentation, dated 2014-12-22, and this gorgeous thing is KINS(9). go forth and move some axes, main character ππ
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms