code wiki / (root) / nx_robot_kinematics.nx

nx_robot_kinematics.nx

buildroot/runtime/nx_robot_kinematics.nx

1922 B41 linesdepth 5pulls 5 transitivereach 1 importersview sourcekind librarytopic robot
docsdependenciesstructsconstsfunctions

about

nx_robot_kinematics.nx -- SOVEREIGN robot KINEMATICS (turn a desired pose into machine/joint motion). Two real machine classes: 1) CoreXY / H-bot / Cartesian -- the kinematics of most printers/CNC/gantry robots. The belt equations are LINEAR -> INTEGER-EXACT, NO TRIG, perfect FK<->IK round-trip. Feeds directly into nx_robot_step (motor deltas -> synchronized stepper pulses). 2) 2-link planar ARM -- the canonical rotary robot arm. FORWARD kinematics (joint angles -> end-effector position) via the sovereign Q10 nx_trig sin/cos. INVERSE arm IK needs acos/atan2 (not yet in nx_trig) -> flagged as the next rung. NO FLOAT throughout (CoreXY exact integer; arm in Q10 fixed point). license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_trig.nx nx_robot_kinematics.nx nx_robot_kinematics_gate.nx

imports: nx_syscalls.nxnx_trig.nx

imported by: nx_robot_kinematics_gate.nx

structs

none

consts

none

functions

15func corexy_ik(x: i64, y: i64, out_a: *i64, out_b: *i64) -> i64
23func corexy_fk(a: i64, b: i64, out_x: *i64, out_y: *i64) -> i64
33func arm2_fk(t1: i64, t2: i64, l1: i64, l2: i64, out_x: *i64, out_y: *i64) -> i64
called by 1: main calls 2: nx_cos_turn_q10nx_sin_turn_q10