Steps to add a new kinematic type

It seems like the recent “master” from Klipper3d/klipper at github has a newer, simpler way to add new kinematics. This may have happened before, but I am trying to set up a delta with more parameters, including tilted towers. I will be trying to develop an autocalibration procedure which can discover good values for all the extra parameters.

I have noted the following steps, so far, to add kinematics:

  • in the printer.cfg [printer] section, add a definition like “kinematics: tilted_delta”
  • make a class similar to existing class in klippy/kinematics, in my case I forked tilted_delta.py from delta.py. In this file I call stepper…setup_itersolve for each of my position steppers, provide the chelper allocation function name, in my case ‘tilted_delta_stepper_alloc’, and pass the necessary parameters.
  • Define a function ‘load_kinematics’ in my tilted_delta.py which calls my new kinematics class constructor.
  • I guess that modern klipper is smart enough to figure out how to import my new tilted_delta.py abd call the constructor
  • I add my kin_tilted_delta.c to the list of SOURCE_FILES in chelper/_init_.py
  • I set a defs_kin_tilted_delta in __init__.pyfor my tilted_delta_stepper_alloc function, which sets up inverse kinematics for my new tilted_delta kinematics, and passes necessary parameters to cache.
  • somehow, klipper figures out to call the tilted_delta_stepper_calc_position function to compute stepper position for a given desired effector location, provided by a call to move_get_coord(m, move_time)

Is this all I need to do? Klipper is doing something clever, likely from the tilted_delta string I provided for the kinematics: value in the [printer] section to set up the call to my cartesian to stepper position C function?

Thanks for the help. This is proving very challenging for somebody who has never run klipper, much less configured it. But klipper seem to be the best platform, by far, to try to develop new kinematics and calibration.