Template Class SO2

Inheritance Relationships

Base Type

Class Documentation

template<class Scalar_, int Options>
class SO2 : public Sophus::SO2Base<SO2<Scalar_, Options>>

SO2 using default storage; derived from SO2Base.

Public Types

using Base = SO2Base<SO2<Scalar_, Options>>
using Scalar = Scalar_
using Transformation = typename Base::Transformation
using Point = typename Base::Point
using HomogeneousPoint = typename Base::HomogeneousPoint
using Tangent = typename Base::Tangent
using Adjoint = typename Base::Adjoint
using ComplexMember = Vector2<Scalar, Options>

Public Functions

SOPHUS_FUNC SO2 & operator= (SO2 const &other)=default

Define copy-assignment operator explicitly. The definition of implicit copy assignment operator is deprecated in presence of a user-declared copy constructor (-Wdeprecated-copy in clang >= 13).

inline EIGEN_MAKE_ALIGNED_OPERATOR_NEW SOPHUS_FUNC SO2 ()

Default constructor initializes unit complex number to identity rotation.

SOPHUS_FUNC SO2(SO2 const &other) = default

Copy constructor

template<class OtherDerived>
inline SOPHUS_FUNC SO2(SO2Base<OtherDerived> const &other)

Copy-like constructor from OtherDerived.

inline explicit SOPHUS_FUNC SO2(Transformation const &R)

Constructor from rotation matrix

Precondition: rotation matrix need to be orthogonal with determinant of 1.

inline SOPHUS_FUNC SO2(Scalar const &real, Scalar const &imag)

Constructor from pair of real and imaginary number.

Precondition: The pair must not be close to zero.

template<class D>
inline explicit SOPHUS_FUNC SO2(Eigen::MatrixBase<D> const &complex)

Constructor from 2-vector.

Precondition: The vector must not be close to zero.

inline explicit SOPHUS_FUNC SO2(Scalar theta)

Constructor from an rotation angle.

inline SOPHUS_FUNC ComplexMember const  & unit_complex () const

Accessor of unit complex number

Public Static Functions

static inline SOPHUS_FUNC SO2< Scalar > exp (Tangent const &theta)

Group exponential

This functions takes in an element of tangent space (= rotation angle theta) and returns the corresponding element of the group SO(2).

To be more specific, this function computes expmat(hat(omega)) with expmat(.) being the matrix exponential and hat(.) being the hat()-operator of SO(2).

static inline SOPHUS_FUNC Sophus::Matrix< Scalar, num_parameters, DoF > Dx_exp_x (Tangent const &theta)

Returns derivative of exp(x) wrt. x.

static inline SOPHUS_FUNC Sophus::Matrix< Scalar, num_parameters, DoF > Dx_exp_x_at_0 ()

Returns derivative of exp(x) wrt. x_i at x=0.

static inline SOPHUS_FUNC Sophus::Matrix< Scalar, 2, DoF > Dx_exp_x_times_point_at_0 (Point const &point)

Returns derivative of exp(x) * p wrt. x_i at x=0.

static inline SOPHUS_FUNC Transformation Dxi_exp_x_matrix_at_0 (int)

Returns derivative of exp(x).matrix() wrt. x_i at x=0.

static inline SOPHUS_FUNC Transformation generator ()

Returns the infinitesimal generators of SO(2).

The infinitesimal generators of SO(2) is:

|  0 -1 |
|  1  0 |

static inline SOPHUS_FUNC Transformation hat (Tangent const &theta)

hat-operator

It takes in the scalar representation theta (= rotation angle) and returns the corresponding matrix representation of Lie algebra element.

Formally, the hat()-operator of SO(2) is defined as

hat(.): R^2 -> R^{2x2}, hat(theta) = theta * G

with G being the infinitesimal generator of SO(2).

The corresponding inverse is the vee()-operator, see below.

template<class S = Scalar> static inline SOPHUS_FUNC enable_if_t< std::is_floating_point< S >::value, SO2 > fitToSO2 (Transformation const &R)

Returns closed SO2 given arbitrary 2x2 matrix.

static inline SOPHUS_FUNC Tangent lieBracket (Tangent const &, Tangent const &)

Lie bracket

It returns the Lie bracket of SO(2). Since SO(2) is a commutative group, the Lie bracket is simple 0.

template<class UniformRandomBitGenerator>
static inline SO2 sampleUniform(UniformRandomBitGenerator &generator)

Draw uniform sample from SO(2) manifold.

static inline SOPHUS_FUNC Tangent vee (Transformation const &Omega)

vee-operator

It takes the 2x2-matrix representation Omega and maps it to the corresponding scalar representation of Lie algebra.

This is the inverse of the hat()-operator, see above.

Precondition: Omega must have the following structure:

           |  0 -a |
           |  a  0 |

Public Static Attributes

static constexpr int DoF = Base::DoF
static constexpr int num_parameters = Base::num_parameters

Protected Functions

inline SOPHUS_FUNC ComplexMember & unit_complex_nonconst ()

Mutator of complex number is protected to ensure class invariant.

Protected Attributes

ComplexMember unit_complex_

Friends

friend class SO2Base< SO2< Scalar, Options > >