newton.ik.IKLBFGSOptimizer#
- class newton.ik.IKLBFGSOptimizer(model, n_batch, objectives, *a, **kw)[source]#
Bases:
objectL-BFGS inverse-kinematics solver with a parallel Wolfe-conditions line search.
This solver uses L-BFGS with a parallel line search that seeks to satisfy the strong Wolfe conditions for robust step selection. It supports the same three Jacobian back-ends as the LM solver:
AUTODIFF — Warp’s reverse-mode autodiff for every objective
ANALYTIC — objective-specific analytic Jacobians only
MIXED — analytic where available, autodiff fallback elsewhere
- Parameters:
model (newton.Model) – Singleton articulation shared by all problems.
n_batch (int) – Number of rows processed in parallel (e.g., n_problems * n_seeds).
objectives (Sequence[IKObjective]) – Ordered list of objectives shared by _all_ problems.
jacobian_mode (IKJacobianMode, default IKJacobianMode.AUTODIFF) – Backend used in compute_jacobian.
history_len (int, default 10) – L-BFGS memory length (number of {s,y} pairs to remember).
h0_scale (float, default 1.0) – Initial Hessian approximation scale factor.
line_search_alphas (list[float], default [0.1, 0.2, 0.5, 0.8, 1.0, 1.5, 2.0, 3.0]) – Parallel step sizes to try in line search.
wolfe_c1 (float, default 1e-4) – Wolfe condition parameter for sufficient decrease (Armijo condition).
wolfe_c2 (float, default 0.9) – Wolfe condition parameter for curvature condition (strong Wolfe).
structure (Batch)
---------------
all (Same as the LM solver - handles a batch of independent IK problems that)
objectives. (reference the same articulation and)
- __init__(model, n_batch, objectives, jacobian_mode=IKJacobianMode.AUTODIFF, history_len=10, h0_scale=1.0, line_search_alphas=None, wolfe_c1=1e-4, wolfe_c2=0.9, *, problem_idx=None)#
- step(joint_q_in, joint_q_out, iterations=50)#
Run L-BFGS iterations using the provided joint buffers.