gtsam
Loading...
Searching...
No Matches
Kernel.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
18
19#pragma once
20
21#include <gtsam/base/Lie.h>
22#include <gtsam/base/Matrix.h>
23#include <gtsam/dllexport.h>
24
25#include <limits>
26
27namespace gtsam {
28namespace so3 {
29
30struct DexpFunctor;
31
38struct GTSAM_EXPORT Kernel {
39 const DexpFunctor* S;
40 double a{0}, b{0}, c{0}, db{0}, dc{0}; // left-specialization form
41
42 Matrix3 left() const; // a I + b Ω + c Ω²
43 Matrix3 right() const; // a I - b Ω + c Ω²
44
45 Vector3 applyLeft(const Vector3& v, OptionalJacobian<3, 3> Hw = {},
46 OptionalJacobian<3, 3> Hv = {}) const;
47 Vector3 applyRight(const Vector3& v, OptionalJacobian<3, 3> Hw = {},
48 OptionalJacobian<3, 3> Hv = {}) const;
49
52 Matrix3 frechet(const Matrix3& X) const;
54 Matrix3 applyFrechet(const Vector3& v) const;
55};
56
57// Stable inverse Jacobian kernel
58struct GTSAM_EXPORT InvJKernel {
59 const DexpFunctor* S;
60 Kernel J; // holds the forward kernel
61
62 Matrix3 left() const;
63 Matrix3 right() const;
64
65 Vector3 applyLeft(const Vector3& v, OptionalJacobian<3, 3> Hw = {},
66 OptionalJacobian<3, 3> Hv = {}) const;
67 Vector3 applyRight(const Vector3& v, OptionalJacobian<3, 3> Hw = {},
68 OptionalJacobian<3, 3> Hv = {}) const;
69};
70
72GTSAM_EXPORT Kernel axpy(double alpha, const Kernel& X, const Kernel& Y);
73
74// Blend K = α X + (1-α) Y with radial derivative (·)'/θ via dalpha
75GTSAM_EXPORT Kernel blend(double alpha, double dalpha, const Kernel& X,
76 const Kernel& Y);
77
78} // namespace so3
79} // namespace gtsam
typedef and functions to augment Eigen's MatrixXd
Base class and basic functions for Lie types.
Kernel axpy(double alpha, const Kernel &X, const Kernel &Y)
y + alpha * x (functional)
Definition Kernel.cpp:149
Global functions in a separate testing namespace.
Definition chartTesting.h:28
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:40
Kernel: M(ω) = a I + b Ω + c Ω² with radial derivatives db,dc for Fréchet.
Definition Kernel.h:38
Matrix3 applyFrechet(const Vector3 &v) const
Apply Fréchet derivative to vector (left specialization).
Definition Kernel.cpp:96
Matrix3 frechet(const Matrix3 &X) const
Fréchet derivative of left-kernel M(ω) in the direction X ∈ so(3) L_M(Ω)[X] = b X + c (Ω X + X Ω) + s...
Definition Kernel.cpp:89
Definition Kernel.h:58
Functor that implements Exponential map and its derivatives Math extends Ethan theme of elegant I + a...
Definition SO3.h:184