Loading...
Searching...
No Matches
SO4.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
#pragma once
#include <gtsam/geometry/SOn.h>
#include <gtsam/base/Group.h>
#include <gtsam/base/Lie.h>
#include <gtsam/base/Manifold.h>
#include <gtsam/base/Matrix.h>
#include <gtsam/dllexport.h>
#include <string>
namespace gtsam {
using SO4 = SO<4>;
// /// Random SO(4) element (no big claims about uniformity)
// static SO4 Random(std::mt19937 &rng);
// Below are all declarations of SO<4> specializations.
// They are *defined* in SO4.cpp.
template <>
GTSAM_EXPORT
Matrix4 SO4::Hat(const TangentVector &xi);
template <>
GTSAM_EXPORT
Vector6 SO4::Vee(const Matrix4 &X);
template <>
GTSAM_EXPORT
SO4 SO4::Expmap(const Vector6 &xi, ChartJacobian H);
template <>
GTSAM_EXPORT
Matrix6 SO4::AdjointMap() const;
template <>
GTSAM_EXPORT
SO4::VectorN2 SO4::vec(OptionalJacobian<16, 6> H) const;
template <>
GTSAM_EXPORT
SO4 SO4::ChartAtOrigin::Retract(const Vector6 &omega, ChartJacobian H);
template <>
GTSAM_EXPORT
Vector6 SO4::ChartAtOrigin::Local(const SO4 &Q, ChartJacobian H);
GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian<9, 6> H = boost::none);
GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian<12, 6> H = boost::none);
template <class Archive>
void serialize(Archive &ar, SO4 &Q, const unsigned int /*version*/) {
Matrix4 &M = Q.matrix_;
ar &boost::serialization::make_nvp("Q11", M(0, 0));
ar &boost::serialization::make_nvp("Q12", M(0, 1));
ar &boost::serialization::make_nvp("Q13", M(0, 2));
ar &boost::serialization::make_nvp("Q14", M(0, 3));
ar &boost::serialization::make_nvp("Q21", M(1, 0));
ar &boost::serialization::make_nvp("Q22", M(1, 1));
ar &boost::serialization::make_nvp("Q23", M(1, 2));
ar &boost::serialization::make_nvp("Q24", M(1, 3));
ar &boost::serialization::make_nvp("Q31", M(2, 0));
ar &boost::serialization::make_nvp("Q32", M(2, 1));
ar &boost::serialization::make_nvp("Q33", M(2, 2));
ar &boost::serialization::make_nvp("Q34", M(2, 3));
ar &boost::serialization::make_nvp("Q41", M(3, 0));
ar &boost::serialization::make_nvp("Q42", M(3, 1));
ar &boost::serialization::make_nvp("Q43", M(3, 2));
ar &boost::serialization::make_nvp("Q44", M(3, 3));
}
/*
* Define the traits. internal::LieGroup provides both Lie group and Testable
*/
template <>
struct traits<SO4> : public internal::LieGroup<SO4> {};
template <>
struct traits<const SO4> : public internal::LieGroup<SO4> {};
} // end namespace gtsam
Matrix.h
typedef and functions to augment Eigen's MatrixXd
Manifold.h
Base class and basic functions for Manifold types.
Lie.h
Base class and basic functions for Lie types.
Group.h
Concept check class for variable types with Group properties.
SOn.h
N*N matrix representation of SO(N).
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::serialize
std::string serialize(const T &input)
serializes to a string
Definition serialization.h:113
gtsam::stiefel
GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian< 12, 6 > H)
Project to Stiefel manifold of 4*3 orthonormal 3-frames in R^4, i.e., pi(Q) -> .
Definition SO4.cpp:220
gtsam::topLeft
GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian< 9, 6 > H)
Project to top-left 3*3 matrix.
Definition SO4.cpp:206
gtsam::TangentVector
gtsam::LieGroup< SO< N >, internal::DimensionSO(N)>::Retract
static SO< N > Retract(const TangentVector &v)
Definition Lie.h:111
gtsam::internal::LieGroup
Both LieGroupTraits and Testable.
Definition Lie.h:229
gtsam::OptionalJacobian
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
gtsam::SO
Manifold of special orthogonal rotation matrices SO<N>.
Definition SOn.h:52
gtsam::SO< 4 >::Expmap
static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none)
gtsam::SO< 4 >::vec
VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost::none) const
gtsam::SO< 4 >::Vee
static TangentVector Vee(const MatrixNN &X)
gtsam::SO< 4 >::AdjointMap
MatrixDD AdjointMap() const
Definition SO4.cpp:159
gtsam::SO< 4 >::Hat
static MatrixNN Hat(const TangentVector &xi)