Template Class SO2
Defined in File so2.hpp
Inheritance Relationships
Base Type
public Sophus::SO2Base< SO2< Scalar_, Options > >
(Template Class SO2Base)
Class Documentation
-
template<class Scalar_, int Options>
class SO2 : public Sophus::SO2Base<SO2<Scalar_, Options>> SO2 using default storage; derived from SO2Base.
Public Types
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.
-
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 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))
withexpmat(.)
being the matrix exponential andhat(.)
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
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 > >