nx_ik.nx
buildroot/runtime/nx_ik.nx
about
nx_ik.nx -- CCD INVERSE KINEMATICS on nx_skeleton (Elara bar E5: "grab a wrist, the arm follows"; the same
solver = robot-arm reach, per the reuse law). Cyclic Coordinate Descent: per sweep, each bone in the chain
nudges its yaw/elevation by a fixed integer step in the direction that closes the effector->target angle --
signs come from CROSS PRODUCTS (no arctangent, no float), so the whole solve is integer-deterministic.
Yaw sign law: +yaw rotates +x toward -z (CW in the XZ plane seen from +y), so yaw -= sign(crossY)*step.
Elevation sign law: es = ty*|eff_h| - effy*|t_h| (elevation-angle comparison without division).
license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_skeleton.nx
imported by: nx_ik_gate.nxnx_wasm_charlab.nx
structs
| none |
consts
| 10 | const K_MAGIC_4096: i64 = 4096 |
functions
| 12 | func ik_isqrt(v: i64) -> i64 called by 1: ik_solve |
| 20 | func ik_effector(sk: i64, tipBone: i64, ex: i64, ey: i64, ez: i64, out: *i64) -> i64 |
| 37 | func ik_solve(sk: i64, tipBone: i64, rootStop: i64, ex: i64, ey: i64, ez: i64, tx: i64, ty: i64, tz: i64, iters: i64, step: i64) -> i64 |