26#include <gtsam/dllexport.h>
74SO3
SO3::Expmap(
const Vector3& omega, ChartJacobian H);
109Vector3 SO3::ChartAtOrigin::Local(
const SO3& R);
113Vector3 SO3::ChartAtOrigin::Local(
const SO3& R, ChartJacobian H);
119#if GTSAM_ENABLE_BOOST_SERIALIZATION
120template <
class Archive>
122void serialize(Archive& ar, SO3& R,
const unsigned int ) {
123 Matrix3& M = R.matrix_;
124 ar& boost::serialization::make_nvp(
"R11", M(0, 0));
125 ar& boost::serialization::make_nvp(
"R12", M(0, 1));
126 ar& boost::serialization::make_nvp(
"R13", M(0, 2));
127 ar& boost::serialization::make_nvp(
"R21", M(1, 0));
128 ar& boost::serialization::make_nvp(
"R22", M(1, 1));
129 ar& boost::serialization::make_nvp(
"R23", M(1, 2));
130 ar& boost::serialization::make_nvp(
"R31", M(2, 0));
131 ar& boost::serialization::make_nvp(
"R32", M(2, 1));
132 ar& boost::serialization::make_nvp(
"R33", M(2, 2));
142GTSAM_EXPORT Matrix3
compose(
const Matrix3& M,
const SO3& R,
143 OptionalJacobian<9, 9> H = {});
146GTSAM_EXPORT Matrix99
Dcompose(
const SO3& R);
169 ExpmapFunctor(
double nearZeroThresholdSq,
const Vector3& axis);
175 inline Matrix3
expmap()
const {
return I_3x3 + A *
W + B *
WW; }
178 void init(
double nearZeroThresholdSq);
192 explicit DexpFunctor(
const Vector3& omega,
double nearZeroThresholdSq,
double nearPiThresholdSq);
195 Kernel Rodrigues() const&;
209 Matrix3 rightJacobian() const;
212 Matrix3 leftJacobian() const;
220 Vector3 tangentExpmap(const Vector3& v,
228 Vector3 tangentExpmap(
const Vector3& v,
const Matrix3& rotation,
231#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
233 Matrix3 rightJacobianInverse()
const;
236 Matrix3 leftJacobianInverse()
const;
239 Vector3 applyRightJacobian(
const Vector3& v,
240 OptionalJacobian<3, 3> H1 = {}, OptionalJacobian<3, 3> H2 = {})
const;
243 Vector3 applyRightJacobianInverse(
const Vector3& v,
244 OptionalJacobian<3, 3> H1 = {}, OptionalJacobian<3, 3> H2 = {})
const;
247 Vector3 applyLeftJacobian(
const Vector3& v,
248 OptionalJacobian<3, 3> H1 = {}, OptionalJacobian<3, 3> H2 = {})
const;
251 Vector3 applyLeftJacobianInverse(
const Vector3& v,
252 OptionalJacobian<3, 3> H1 = {}, OptionalJacobian<3, 3> H2 = {})
const;
255 inline Matrix3 dexp()
const {
return rightJacobian(); }
258 inline Matrix3 invDexp()
const {
return rightJacobianInverse(); }
274 mutable std::optional<double> C_, D_,
E_;
275 mutable std::optional<double> dA_, dB_, dC_,
dE_;
typedef and functions to augment Eigen's MatrixXd
Macros for Matrix constants to avoid excessive template instantiation.
Base class and basic functions for Lie types.
N*N matrix representation of SO(N).
GTSAM_EXPORT Matrix99 Dcompose(const SO3 &Q)
(constant) Jacobian of compose wrpt M
Definition SO3.cpp:61
GTSAM_EXPORT Matrix3 compose(const Matrix3 &M, const SO3 &R, OptionalJacobian< 9, 9 > H)
Compose general matrix with an SO(3) element.
Definition SO3.cpp:70
Specialized kernels for SO(3).
Global functions in a separate testing namespace.
Definition chartTesting.h:28
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
static SO< N > Retract(const TangentVector &v)
Definition Lie.h:193
Both LieGroupTraits and Testable.
Definition MatrixLieGroup.h:350
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
Opaque evaluation context at ω: caches Ω, Ω², θ, θ², nearZero/nearPi, Lazily computes C,...
Definition SO3.h:154
bool nearZero
Flag indicating if theta is near zero.
Definition SO3.h:159
double theta
The norm of the rotation vector (θ).
Definition SO3.h:156
Matrix3 expmap() const
Rodrigues formula.
Definition SO3.h:175
Matrix3 WW
The square of the skew-symmetric matrix (Ω²).
Definition SO3.h:158
Matrix3 W
The skew-symmetric matrix Ω for the rotation vector.
Definition SO3.h:157
ExpmapFunctor(const Vector3 &omega)
Constructor with element of Lie algebra so(3).
Definition SO3.cpp:95
double theta2
The squared norm of the rotation vector (θ²).
Definition SO3.h:155
Functor that implements Exponential map and its derivatives Math extends Ethan theme of elegant I + a...
Definition SO3.h:184
std::optional< double > E_
C, D and E lazily computed.
Definition SO3.h:274
bool nearPi
Flag indicating if theta is near pi.
Definition SO3.h:186
std::optional< double > dE_
lazy c(θ)′/θ
Definition SO3.h:275
DexpFunctor(const Vector3 &omega)
Constructor with element of Lie algebra so(3).
Definition SO3.cpp:122
Vector3 omega
The rotation vector.
Definition SO3.h:185
Manifold of special orthogonal rotation matrices SO<N>.
Definition SOn.h:55
static SO ChordalMean(const std::vector< SO > &rotations)
static TangentVector Vee(const MatrixNN &X)
MatrixNN matrix_
Rotation matrix.
Definition SOn.h:66
VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H={}) const
Definition SOn.h:306
static SO Expmap(const TangentVector &omega)
static SO AxisAngle(const Vector3 &axis, double theta)
Definition SO3.cpp:254
static MatrixNN Hat(const TangentVector &xi)
static MatrixDD LogmapDerivative(const TangentVector &omega)=delete
static MatrixDD ExpmapDerivative(const TangentVector &omega)=delete
static TangentVector Logmap(const SO &R)
MatrixDD AdjointMap() const
Definition SOn.h:272
static SO ClosestTo(const MatrixNN &M)