SO4.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010-2019, 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 
20 #pragma once
21 
22 #include <gtsam/geometry/SOn.h>
23 
24 #include <gtsam/base/Group.h>
25 #include <gtsam/base/Lie.h>
26 #include <gtsam/base/Manifold.h>
27 #include <gtsam/base/Matrix.h>
28 #include <gtsam/dllexport.h>
29 
30 #include <string>
31 
32 namespace gtsam {
33 
34 using SO4 = SO<4>;
35 
36 // /// Random SO(4) element (no big claims about uniformity)
37 // static SO4 Random(std::mt19937 &rng);
38 
39 // Below are all declarations of SO<4> specializations.
40 // They are *defined* in SO4.cpp.
41 
42 template <>
43 GTSAM_EXPORT
44 Matrix4 SO4::Hat(const TangentVector &xi);
45 
46 template <>
47 GTSAM_EXPORT
48 Vector6 SO4::Vee(const Matrix4 &X);
49 
50 template <>
51 GTSAM_EXPORT
52 SO4 SO4::Expmap(const Vector6 &xi, ChartJacobian H);
53 
54 template <>
55 GTSAM_EXPORT
56 Matrix6 SO4::AdjointMap() const;
57 
58 template <>
59 GTSAM_EXPORT
61 
62 template <>
63 GTSAM_EXPORT
64 SO4 SO4::ChartAtOrigin::Retract(const Vector6 &omega, ChartJacobian H);
65 
66 template <>
67 GTSAM_EXPORT
68 Vector6 SO4::ChartAtOrigin::Local(const SO4 &Q, ChartJacobian H);
69 
73 GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian<9, 6> H = {});
74 
79 GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian<12, 6> H = {});
80 
81 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
82 template <class Archive>
84 void serialize(Archive &ar, SO4 &Q, const unsigned int /*version*/) {
85  Matrix4 &M = Q.matrix_;
86  ar &boost::serialization::make_nvp("Q11", M(0, 0));
87  ar &boost::serialization::make_nvp("Q12", M(0, 1));
88  ar &boost::serialization::make_nvp("Q13", M(0, 2));
89  ar &boost::serialization::make_nvp("Q14", M(0, 3));
90 
91  ar &boost::serialization::make_nvp("Q21", M(1, 0));
92  ar &boost::serialization::make_nvp("Q22", M(1, 1));
93  ar &boost::serialization::make_nvp("Q23", M(1, 2));
94  ar &boost::serialization::make_nvp("Q24", M(1, 3));
95 
96  ar &boost::serialization::make_nvp("Q31", M(2, 0));
97  ar &boost::serialization::make_nvp("Q32", M(2, 1));
98  ar &boost::serialization::make_nvp("Q33", M(2, 2));
99  ar &boost::serialization::make_nvp("Q34", M(2, 3));
100 
101  ar &boost::serialization::make_nvp("Q41", M(3, 0));
102  ar &boost::serialization::make_nvp("Q42", M(3, 1));
103  ar &boost::serialization::make_nvp("Q43", M(3, 2));
104  ar &boost::serialization::make_nvp("Q44", M(3, 3));
105 }
106 #endif
107 
108 /*
109  * Define the traits. internal::LieGroup provides both Lie group and Testable
110  */
111 
112 template <>
113 struct traits<SO4> : public internal::LieGroup<SO4> {};
114 
115 template <>
116 struct traits<const SO4> : public internal::LieGroup<SO4> {};
117 
118 } // end namespace gtsam
SOn.h
N*N matrix representation of SO(N). N can be Eigen::Dynamic.
gtsam::topLeft
GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian< 9, 6 > H)
Definition: SO4.cpp:206
H
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Definition: gnuplot_common_settings.hh:74
gtsam::SO::ChartAtOrigin::Retract
static SO Retract(const TangentVector &xi, ChartJacobian H={})
Definition: SOn-inl.h:40
gtsam::SO4
SO< 4 > SO4
Definition: SO4.h:34
gtsam::stiefel
GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian< 12, 6 > H)
Definition: SO4.cpp:220
gtsam::SO::Hat
static MatrixNN Hat(const TangentVector &xi)
Definition: SOn-inl.h:29
screwPose2::xi
Vector xi
Definition: testPose2.cpp:148
Matrix.h
typedef and functions to augment Eigen's MatrixXd
Group.h
Concept check class for variable types with Group properties.
X
#define X
Definition: icosphere.cpp:20
gtsam::SO::Expmap
static SO Expmap(const TangentVector &omega, ChartJacobian H={})
Definition: SOn-inl.h:67
biased_x_rotation::omega
const double omega
Definition: testPreintegratedRotation.cpp:32
gtsam::internal::LieGroup
Both LieGroupTraits and Testable.
Definition: Lie.h:229
Manifold.h
Base class and basic functions for Manifold types.
gtsam::SO::AdjointMap
MatrixDD AdjointMap() const
Adjoint map.
Definition: SO4.cpp:159
Eigen::Quaternion
The quaternion class used to represent 3D orientations and rotations.
Definition: ForwardDeclarations.h:293
Lie.h
Base class and basic functions for Lie types.
gtsam
traits
Definition: SFMdata.h:40
gtsam::traits
Definition: Group.h:36
gtsam::OptionalJacobian
Definition: OptionalJacobian.h:38
gtsam::SO::ChartAtOrigin::Local
static TangentVector Local(const SO &R, ChartJacobian H={})
Definition: SOn-inl.h:50
gtsam::SO
Definition: SOn.h:54
gtsam::SO::Vee
static TangentVector Vee(const MatrixNN &X)
Inverse of Hat. See note about xi element order in Hat.
Definition: SOn-inl.h:35
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition: 3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
gtsam::SO::vec
VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H={}) const
Definition: SOn-inl.h:88
M
Matrix< RealScalar, Dynamic, Dynamic > M
Definition: bench_gemm.cpp:51


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:23