Skip to content

Kinematics

Nishendra Singh edited this page Aug 19, 2026 · 2 revisions

For developers. The FK/IK pipeline and the backend system.

IK drag pipeline

  1. The Tool FPO (App/rbt_tool.py) calculates a world TCP_placement in its execute().
  2. Its ViewProvider (Gui/vp_rbt_tool.py) shows a Coin3D sphere at the TCP. You can pull the sphere.
  3. Drag events project the mouse ray onto a camera-facing plane through the drag-start TCP. This gives a 6D target.
  4. The target goes to App/rbt_kine.py:ik().
  5. The solver writes the solution into the Offset2 values of the joints. The assembly solves again.

Backends

ik() sends the work to a backend. The protocol is in backends/base.py.

Backend Dependency Note
numpy_dls none Default (DEFAULT_KIN_LIB). Damped least squares
pinocchio pin
tesseract tesseract-robotics
ikpy ikpy Position-only
  • The robot's KinematicsLib property selects the backend.
  • If the library is not installed, the addon uses numpy_dls and writes a pip hint to the log (PIP_HINTS in App/rbt_global_constants.py).
  • The backend instance is in a cache with the key (robot, lib) in rbt_kine.py. Robot.onChanged clears the cache.

Chain extraction

App/rbt_kine_chain.py:extract_chain makes a ChainSpec (dataclasses in rbt_kine_types.py).

  • It operates at all poses: it removes the current joint values algebraically (unrotate). No physical zero move is necessary.
  • All frames are in robot-assembly coordinates. Thus the chain does not change when the base moves.
  • Chain tip = TCP when a tool is configured, else the last joint frame (ChainSpec.flange_local).

Import direction

rbt_placement ← rbt_kine_chain ← rbt_kine ← rbt_robot ← rbt_creator. This chain must stay acyclic: chain_root is in rbt_placement.py, not in the kine modules.

Units

Millimeters and degrees at the FreeCAD boundary. Meters and radians in the backends. backends/base.py converts.

Clone this wiki locally