Shortcuts

pypose.optim.corrector.Triggs

class pypose.optim.corrector.Triggs(kernel)[source]

The Triggs correction of model residual and Jacobian.

\[\begin{align*} \mathbf{R}_i^\rho &= \frac{\sqrt{\rho'(c_i)}}{1 - \alpha} \mathbf{R}_i,\\ \mathbf{J}_i^\rho &= \sqrt{\rho'(c_i)} \left(\mathbf{I} - \alpha \frac{\mathbf{R}_i^T\mathbf{R}_i}{\|\mathbf{R}_i\|^2} \right) \mathbf{J}_i, \end{align*} \]

where \(\alpha\) is a root of

\[\frac{1}{2} \alpha^2 - \alpha - \frac{\rho''}{\rho'} \|\mathbf{R}_i\|^2 = 0. \]

\(\mathbf{R}_i\) and \(\mathbf{J}_i\) are the \(i\)-th item of the model residual and Jacobian, respectively. \(\rho()\) is the kernel function and \(c_i = \mathbf{R}_i^T\mathbf{R}_i\) is the evaluation point.

Parameters

kernel (nn.Module) – the robust kernel (cost) function.

Note

This implementation thanks to Eq. (11) of the following paper.

Warning

The FastTriggs() corrector is preferred when the kernel function has a negative 2nd order derivative.

forward(R, J)[source]
Parameters
  • R (Tensor) – the model residual.

  • J (Tensor) – the model Jacobian.

Returns

the corrected model residual and model Jacobian.

Return type

tuple of Tensors

Note

The users basically only need to call the constructor, while the forward() function is not supposed to be directly called by PyPose users. It will be called internally by optimizers such as pypose.optim.GN() and pypose.optim.LM().

Docs

Access documentation for PyPose

View Docs

Tutorials

Get started with tutorials and examples

View Tutorials

Get Started

Find resources and how to start using pypose

View Resources