Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions agent_context/topics/ik-solvers/ik-solvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,39 @@ class RobotCfg(ArticulationCfg):

- `dh_params`, `link_lengths`, `rotation_directions`, `T_b_ob`, `T_e_oe`: kinematic model params.
- `sort_ik`: whether to rank solutions by distance to seed.
- `search_mode`: `"seeded"` computes the seed's geometric shoulder-elbow-wrist
arm angle and searches redundancy angles radially around it; if the configured
radial step cannot produce `num_samples` distinct angles in one revolution,
the incomplete radial prefix is replaced by a complete seed-centered uniform
full-circle grid. `"full"` samples the complete `[-pi, pi)` interval directly.
- `redundancy_step`: angular increment used by seed-centered search.
- Requesting all solutions always uses full-space redundancy sampling.
- CPU and CUDA derive the reference plane in the base frame and use the same
signed arm-angle, shoulder-azimuth degeneracy rule, and periodic
nearest-solution formulas. Shoulder azimuth is set to zero only when the
shoulder-to-wrist projection onto the XY plane is near zero.
- At shoulder or wrist Euler singularities, both analytical backends preserve
the seed's free coupled joint and solve the remaining coupled angle, avoiding
arbitrary equivalent-angle jumps near singular configurations.
- Candidate revolute angles are shifted by integer multiples of `2*pi` into
the configured joint limits, choosing the representation nearest the seed.
- Runtime `set_tcp()` and `set_ik_nearest_weight()` calls synchronize the CPU
and Warp analytical-backend caches immediately.
- CPU target/reference-plane geometry is precomputed per target and elbow
branch. CUDA derives target/config/angle indices directly from the Warp
thread id, and all-solution sorting uses device-side tensor sorting rather
than a serial quadratic Warp sort.
- Warp arm-angle and IK scratch arrays are reused by shape within a solver
instance to avoid repeated device allocations during steady-state calls.
- Periodic-equivalent all-solutions candidates are greedily deduplicated
against retained representatives on CPU before indexing the original device
tensor, preserving order without allocating quadratic GPU scratch space.
- Requires `num_envs` in `init_solver()`.

Focused performance and accuracy validation is available at
`scripts/benchmark/robotics/kinematic_solver/srs_solver.py`; it compares CPU
and available CUDA backends in seeded and full redundancy-search modes.

### OPWSolver-specific

- `a1, a2, b, c1–c4, offsets, flip_axes, has_parallelogram`: OPW kinematic parameters.
Expand Down
Loading
Loading