USERKINS(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– USERKINS(9) β€” bestie's guide to the HAL Component πŸ’–

okay so. this is a page from the HAL Component manual section, and it's about userkins β€” which is literally just a template you can take and make your own. it's giving "starter pack" energy. let's get into it πŸŽ€


✨ NAME ✨

userkins β€” the template for user-built kinematics, periodt πŸ’…


🌸 SYNOPSIS 🌸

loadrt userkins [count=N|names=name1[,name2...]]

πŸ¦‹ DESCRIPTION πŸ¦‹

the userkins.comp file is a whole template for making kinematics that you can user-build using halcompile. no cap. πŸ”₯

if you don't touch it at all, the unmodified userkins component still works as a kinematics file for a machine with identity kinematics β€” that's an xyz machine using 3 joints (aka motors). slay.

πŸ’œ USAGE πŸ’œ

  1. copy the userkins.comp file into a directory you own (mydir).
note bestie: you can download userkins.comp from https://github.com/LinuxCNC/linuxcnc/raw/2.8/src/hal/components/userkins.comp where '2.8' is the branch name (use 'master' for the master branch).

for a RIP (run-in-place) build, the file lives in the git tree like this:

src/hal/components/userkins.comp
  1. edit the functions kinematicsForward() and kinematicsInverse() however you need to ✏️
  2. if you need them, add hal pins β€” just follow the examples in the template code 🫢
  3. build and install the component using halcompile:
$ cd mydir
$ [sudo] halcompile --install userkins.comp
# Note:
#      sudo is required when using a deb install
#      sudo is not required for run-in-place builds
# $ man halcompile for more info
  1. specify userkins in an ini file like this:
[KINS]
KINEMATICS=userkins
JOINTS=3
# the number of JOINTS must agree with the
# number of joints used in your modified userkins.comp
  1. note: the manpage for userkins is not updated by halcompile --install πŸ™ˆ
  2. want a different component name? rename the file (example: mykins.comp) and then change all instances of 'userkins' to 'mykins' πŸ”

⭐ NOTES ⭐

  1. the fpin pin is included just to satisfy the requirements of the halcompile utility, but heads up β€” it is not accessible to kinematics functions.
  2. hal pins and parameters that you need inside kinematics functions (kinematicsForward(), kinematicsInverse()) have to be set up in a function (userkins_setup()) that gets invoked by the initial motion module call to kinematicsType().

πŸ”₯ FUNCTIONS πŸ”₯

  • userkins.N.fdemo β€” this one requires a floating-point thread ⚠️

🌈 PINS 🌈

  • userkins.N.fpin s32 out (default: 0) β€” a pin that demonstrates use of a conventional (non-kinematics) function fdemo ✨

πŸ‘‘ AUTHOR πŸ‘‘

Dewey Garrett


πŸ’€ LICENSE πŸ’€

GPL


okay that's the whole thing, you ate it up, you're the main character of HAL now πŸ’– this was USERKINS(9) from the HAL Component manual, served to you by LinuxCNC Documentation on 2026-03-17 β€” ily, go build something iconic πŸ¦‹βœ¨

πŸ“¦ where this page comes from