IK is provided by theDocumentation Index
Fetch the complete documentation index at: https://dadd.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
useIkController() hook — it is not part of the core MujocoSimAPI. The hook returns an IkContextValue that you pass to <IkGizmo> or use directly.
Setup
IkContextValue Methods
setIkEnabled(enabled)
Enable or disable the IK solver.moveTarget(pos, duration?)
Animate the IK target (gizmo) to a new position.syncTargetToSite()
Snap the IK gizmo to the current site position.solveIK(pos, quat, currentQ)
Run IK solving manually (without the gizmo).number[] | null — joint positions, or null if solver failed.
getGizmoStats()
Get the current IK gizmo position and orientation.{ pos: THREE.Vector3, rot: THREE.Euler } | null
Disabling IK
Passnull to useIkController() to disable IK entirely. This is safe to call unconditionally (React hook rules):
Custom IK Solver
PassikSolveFn to the config to replace the built-in solver:
- Analytical IK — faster and more reliable for specific robot geometries
- Learned IK — neural network solvers trained on your robot
- External solvers — calling into WASM-compiled libraries (e.g. KDL, TRAC-IK)
- Constrained IK — solvers that enforce joint limits, collision avoidance, or task-space constraints
Built-in Solver Details
The default solver uses Damped Least-Squares (DLS) with finite-difference Jacobian:- Max iterations: 50 per frame (configurable)
- Damping: 0.01 (configurable)
- Position weight: 1.0
- Rotation weight: 0.3
- Tolerance: 1e-3
- Method: Finite-difference Jacobian + pseudoinverse