Create a local parameterization with the Jacobians computed via automatic differentiation. More...
#include <autodiff_local_parameterization.h>

Public Member Functions | |
| AutoDiffLocalParameterization () | |
| Constructs new PlusFunctor and MinusFunctor instances. More... | |
| AutoDiffLocalParameterization (PlusFunctor *plus_functor, MinusFunctor *minus_functor) | |
| Takes ownership of the provided PlusFunctor and MinusFunctor instances. More... | |
| bool | ComputeJacobian (const double *x, double *jacobian) const override |
| The Jacobian of Plus(x, delta) w.r.t delta at delta = 0, computed using automatic differentiation. More... | |
| bool | ComputeMinusJacobian (const double *x, double *jacobian) const override |
| The Jacobian of Minus(x1, x2) w.r.t x2 evaluated at x1 = x2 = x, computed using automatic differentiation. More... | |
| FUSE_SMART_PTR_DEFINITIONS (AutoDiffLocalParameterization< PlusFunctor, MinusFunctor, kGlobalSize, kLocalSize >) | |
| int | GlobalSize () const override |
| The size of the variable parameterization in the nonlinear manifold. More... | |
| int | LocalSize () const override |
| The size of a delta vector in the linear tangent space to the nonlinear manifold. More... | |
| bool | Minus (const double *x1, const double *x2, double *delta) const override |
| Generalization of the subtraction operation, implemented by the provided MinusFunctor. More... | |
| bool | Plus (const double *x, const double *delta, double *x_plus_delta) const override |
| Generalization of the addition operation, implemented by the provided PlusFunctor. More... | |
Public Member Functions inherited from fuse_core::LocalParameterization | |
| FUSE_SMART_PTR_ALIASES_ONLY (LocalParameterization) | |
| virtual | ~LocalParameterization ()=default |
| Destroy the Local Parameterization object. More... | |
Private Attributes | |
| std::unique_ptr< MinusFunctor > | minus_functor_ |
| std::unique_ptr< PlusFunctor > | plus_functor_ |
Create a local parameterization with the Jacobians computed via automatic differentiation.
To get an auto differentiated local parameterization, you must define two classes with a templated operator() (a.k.a. a functor).
The first functor should compute:
Plus(x, delta) -> x_plus_delta
And the second functor should compute the inverse operation:
Minus(x1, x2) -> delta
Minus() should be defined such that if Plus(x1, delta) -> x2, then Minus(x1, x2) -> delta
The autodiff framework substitutes appropriate "Jet" objects for the template parameter T in order to compute the derivative when necessary, but this is hidden, and you should write the function as if T were a scalar type (e.g. a double-precision floating point number).
Additionally the GlobalSize and LocalSize must be specified as template parameters.
For more information on local parameterizations, see fuse_core::LocalParameterization
Definition at line 77 of file autodiff_local_parameterization.h.
| fuse_core::AutoDiffLocalParameterization< PlusFunctor, MinusFunctor, kGlobalSize, kLocalSize >::AutoDiffLocalParameterization |
Constructs new PlusFunctor and MinusFunctor instances.
Definition at line 155 of file autodiff_local_parameterization.h.
| fuse_core::AutoDiffLocalParameterization< PlusFunctor, MinusFunctor, kGlobalSize, kLocalSize >::AutoDiffLocalParameterization | ( | PlusFunctor * | plus_functor, |
| MinusFunctor * | minus_functor | ||
| ) |
Takes ownership of the provided PlusFunctor and MinusFunctor instances.
Definition at line 162 of file autodiff_local_parameterization.h.
|
overridevirtual |
The Jacobian of Plus(x, delta) w.r.t delta at delta = 0, computed using automatic differentiation.
| [in] | x | The value used to evaluate the Jacobian, of size GloblaSize() |
| [out] | jacobian | The Jacobian in row-major order, of size GlobalSize() x LocalSize() |
Implements fuse_core::LocalParameterization.
Definition at line 180 of file autodiff_local_parameterization.h.
|
overridevirtual |
The Jacobian of Minus(x1, x2) w.r.t x2 evaluated at x1 = x2 = x, computed using automatic differentiation.
| [in] | x | The value used to evaluate the Jacobian, of size GlobalSize() |
| [out] | jacobian | The Jacobian in row-major order, of size LocalSize() x GlobalSize() |
Implements fuse_core::LocalParameterization.
Definition at line 208 of file autodiff_local_parameterization.h.
| fuse_core::AutoDiffLocalParameterization< PlusFunctor, MinusFunctor, kGlobalSize, kLocalSize >::FUSE_SMART_PTR_DEFINITIONS | ( | AutoDiffLocalParameterization< PlusFunctor, MinusFunctor, kGlobalSize, kLocalSize > | ) |
|
inlineoverridevirtual |
The size of the variable parameterization in the nonlinear manifold.
Implements fuse_core::LocalParameterization.
Definition at line 142 of file autodiff_local_parameterization.h.
|
inlineoverridevirtual |
The size of a delta vector in the linear tangent space to the nonlinear manifold.
Implements fuse_core::LocalParameterization.
Definition at line 147 of file autodiff_local_parameterization.h.
|
overridevirtual |
Generalization of the subtraction operation, implemented by the provided MinusFunctor.
| [in] | x1 | The value of the first variable, of size GlobalSize() |
| [in] | x2 | The value of the second variable, of size GlobalSize() |
| [out] | delta | The difference between the second variable and the first, of size LocalSize() |
Implements fuse_core::LocalParameterization.
Definition at line 199 of file autodiff_local_parameterization.h.
|
overridevirtual |
Generalization of the addition operation, implemented by the provided PlusFunctor.
| [in] | x | The starting variable value, of size GlobalSize() |
| [in] | delta | The variable increment to apply, of size LocalSize() |
| [out] | x_plus_delta | The final variable value, of size GlobalSize() |
Implements fuse_core::LocalParameterization.
Definition at line 171 of file autodiff_local_parameterization.h.
|
private |
Definition at line 151 of file autodiff_local_parameterization.h.
|
private |
Definition at line 150 of file autodiff_local_parameterization.h.