Public Types | Public Member Functions | Static Public Attributes | List of all members
Sophus::Sim3Base< Derived > Class Template Reference

#include <sim3.hpp>

Public Types

using Adjoint = Matrix< Scalar, DoF, DoF >
 
using HomogeneousPoint = Vector4< Scalar >
 
template<typename HPointDerived >
using HomogeneousPointProduct = Vector4< ReturnScalar< HPointDerived > >
 
using Line = ParametrizedLine3< Scalar >
 
using Point = Vector3< Scalar >
 
template<typename PointDerived >
using PointProduct = Vector3< ReturnScalar< PointDerived > >
 
using QuaternionType = typename RxSO3Type::QuaternionType
 
template<typename OtherDerived >
using ReturnScalar = typename Eigen::ScalarBinaryOpTraits< Scalar, typename OtherDerived::Scalar >::ReturnType
 
using RxSO3Type = typename Eigen::internal::traits< Derived >::RxSO3Type
 
using Scalar = typename Eigen::internal::traits< Derived >::Scalar
 
template<typename OtherDerived >
using Sim3Product = Sim3< ReturnScalar< OtherDerived > >
 
using Tangent = Vector< Scalar, DoF >
 
using Transformation = Matrix< Scalar, N, N >
 
using TranslationType = typename Eigen::internal::traits< Derived >::TranslationType
 

Public Member Functions

SOPHUS_FUNC Adjoint Adj () const
 
template<class NewScalarType >
SOPHUS_FUNC Sim3< NewScalarType > cast () const
 
SOPHUS_FUNC Sim3< Scalarinverse () const
 
SOPHUS_FUNC Tangent log () const
 
SOPHUS_FUNC Transformation matrix () const
 
SOPHUS_FUNC Matrix< Scalar, 3, 4 > matrix3x4 () const
 
template<typename HPointDerived , typename = typename std::enable_if< IsFixedSizeVector<HPointDerived, 4>::value>::type>
SOPHUS_FUNC HomogeneousPointProduct< HPointDerived > operator* (Eigen::MatrixBase< HPointDerived > const &p) const
 
template<typename PointDerived , typename = typename std::enable_if< IsFixedSizeVector<PointDerived, 3>::value>::type>
SOPHUS_FUNC PointProduct< PointDerived > operator* (Eigen::MatrixBase< PointDerived > const &p) const
 
SOPHUS_FUNC Line operator* (Line const &l) const
 
template<typename OtherDerived >
SOPHUS_FUNC Sim3Product< OtherDerived > operator* (Sim3Base< OtherDerived > const &other) const
 
template<typename OtherDerived , typename = typename std::enable_if< std::is_same<Scalar, ReturnScalar<OtherDerived>>::value>::type>
SOPHUS_FUNC Sim3Base< Derived > & operator*= (Sim3Base< OtherDerived > const &other)
 
SOPHUS_FUNC Sim3Baseoperator= (Sim3Base const &other)=default
 
template<class OtherDerived >
SOPHUS_FUNC Sim3Base< Derived > & operator= (Sim3Base< OtherDerived > const &other)
 
SOPHUS_FUNC Sophus::Vector< Scalar, num_parametersparams () const
 
SOPHUS_FUNC QuaternionType const & quaternion () const
 
SOPHUS_FUNC Matrix3< ScalarrotationMatrix () const
 
SOPHUS_FUNC RxSO3Typerxso3 ()
 
SOPHUS_FUNC RxSO3Type const & rxso3 () const
 
SOPHUS_FUNC Scalar scale () const
 
SOPHUS_FUNC void setQuaternion (Eigen::Quaternion< Scalar > const &quat)
 
SOPHUS_FUNC void setRotationMatrix (Matrix3< Scalar > &R)
 
SOPHUS_FUNC void setScale (Scalar const &scale)
 
SOPHUS_FUNC void setScaledRotationMatrix (Matrix3< Scalar > const &sR)
 
SOPHUS_FUNC TranslationTypetranslation ()
 
SOPHUS_FUNC TranslationType const & translation () const
 

Static Public Attributes

static constexpr int DoF = 7
 
static constexpr int N = 4
 Group transformations are 4x4 matrices. More...
 
static constexpr int num_parameters = 7
 

Detailed Description

template<class Derived>
class Sophus::Sim3Base< Derived >

Sim3 base type - implements Sim3 class but is storage agnostic.

Sim(3) is the group of rotations and translation and scaling in 3d. It is the semi-direct product of R+xSO(3) and the 3d Euclidean vector space. The class is represented using a composition of RxSO3 for scaling plus rotation and a 3-vector for translation.

Sim(3) is neither compact, nor a commutative group.

See RxSO3 for more details of the scaling + rotation representation in 3d.

Definition at line 59 of file sim3.hpp.

Member Typedef Documentation

◆ Adjoint

template<class Derived >
using Sophus::Sim3Base< Derived >::Adjoint = Matrix<Scalar, DoF, DoF>

Definition at line 80 of file sim3.hpp.

◆ HomogeneousPoint

template<class Derived >
using Sophus::Sim3Base< Derived >::HomogeneousPoint = Vector4<Scalar>

Definition at line 77 of file sim3.hpp.

◆ HomogeneousPointProduct

template<class Derived >
template<typename HPointDerived >
using Sophus::Sim3Base< Derived >::HomogeneousPointProduct = Vector4<ReturnScalar<HPointDerived> >

Definition at line 97 of file sim3.hpp.

◆ Line

template<class Derived >
using Sophus::Sim3Base< Derived >::Line = ParametrizedLine3<Scalar>

Definition at line 78 of file sim3.hpp.

◆ Point

template<class Derived >
using Sophus::Sim3Base< Derived >::Point = Vector3<Scalar>

Definition at line 76 of file sim3.hpp.

◆ PointProduct

template<class Derived >
template<typename PointDerived >
using Sophus::Sim3Base< Derived >::PointProduct = Vector3<ReturnScalar<PointDerived> >

Definition at line 94 of file sim3.hpp.

◆ QuaternionType

template<class Derived >
using Sophus::Sim3Base< Derived >::QuaternionType = typename RxSO3Type::QuaternionType

Definition at line 65 of file sim3.hpp.

◆ ReturnScalar

template<class Derived >
template<typename OtherDerived >
using Sophus::Sim3Base< Derived >::ReturnScalar = typename Eigen::ScalarBinaryOpTraits< Scalar, typename OtherDerived::Scalar>::ReturnType

For binary operations the return type is determined with the ScalarBinaryOpTraits feature of Eigen. This allows mixing concrete and Map types, as well as other compatible scalar types such as Ceres::Jet and double scalars with Sim3 operations.

Definition at line 88 of file sim3.hpp.

◆ RxSO3Type

template<class Derived >
using Sophus::Sim3Base< Derived >::RxSO3Type = typename Eigen::internal::traits<Derived>::RxSO3Type

Definition at line 64 of file sim3.hpp.

◆ Scalar

template<class Derived >
using Sophus::Sim3Base< Derived >::Scalar = typename Eigen::internal::traits<Derived>::Scalar

Definition at line 61 of file sim3.hpp.

◆ Sim3Product

template<class Derived >
template<typename OtherDerived >
using Sophus::Sim3Base< Derived >::Sim3Product = Sim3<ReturnScalar<OtherDerived> >

Definition at line 91 of file sim3.hpp.

◆ Tangent

template<class Derived >
using Sophus::Sim3Base< Derived >::Tangent = Vector<Scalar, DoF>

Definition at line 79 of file sim3.hpp.

◆ Transformation

template<class Derived >
using Sophus::Sim3Base< Derived >::Transformation = Matrix<Scalar, N, N>

Definition at line 75 of file sim3.hpp.

◆ TranslationType

template<class Derived >
using Sophus::Sim3Base< Derived >::TranslationType = typename Eigen::internal::traits<Derived>::TranslationType

Definition at line 63 of file sim3.hpp.

Member Function Documentation

◆ Adj()

template<class Derived >
SOPHUS_FUNC Adjoint Sophus::Sim3Base< Derived >::Adj ( ) const
inline

Adjoint transformation

This function return the adjoint transformation Ad of the group element A such that for all x it holds that hat(Ad_A * x) = A * hat(x) A^{-1}. See hat-operator below.

Definition at line 105 of file sim3.hpp.

◆ cast()

template<class Derived >
template<class NewScalarType >
SOPHUS_FUNC Sim3<NewScalarType> Sophus::Sim3Base< Derived >::cast ( ) const
inline

Returns copy of instance casted to NewScalarType.

Definition at line 122 of file sim3.hpp.

◆ inverse()

template<class Derived >
SOPHUS_FUNC Sim3<Scalar> Sophus::Sim3Base< Derived >::inverse ( ) const
inline

Returns group inverse.

Definition at line 129 of file sim3.hpp.

◆ log()

template<class Derived >
SOPHUS_FUNC Tangent Sophus::Sim3Base< Derived >::log ( ) const
inline

Logarithmic map

Computes the logarithm, the inverse of the group exponential which maps element of the group (rigid body transformations) to elements of the tangent space (twist).

To be specific, this function computes vee(logmat(.)) with logmat(.) being the matrix logarithm and vee(.) the vee-operator of Sim(3).

Definition at line 144 of file sim3.hpp.

◆ matrix()

template<class Derived >
SOPHUS_FUNC Transformation Sophus::Sim3Base< Derived >::matrix ( ) const
inline

Returns 4x4 matrix representation of the instance.

It has the following form:

| s*R t |
|  o  1 |

where R is a 3x3 rotation matrix, s a scale factor, t a translation 3-vector and o a 3-column vector of zeros.

Definition at line 176 of file sim3.hpp.

◆ matrix3x4()

template<class Derived >
SOPHUS_FUNC Matrix<Scalar, 3, 4> Sophus::Sim3Base< Derived >::matrix3x4 ( ) const
inline

Returns the significant first three rows of the matrix above.

Definition at line 186 of file sim3.hpp.

◆ operator*() [1/4]

template<class Derived >
template<typename HPointDerived , typename = typename std::enable_if< IsFixedSizeVector<HPointDerived, 4>::value>::type>
SOPHUS_FUNC HomogeneousPointProduct<HPointDerived> Sophus::Sim3Base< Derived >::operator* ( Eigen::MatrixBase< HPointDerived > const &  p) const
inline

Group action on homogeneous 3-points. See above for more details.

Definition at line 240 of file sim3.hpp.

◆ operator*() [2/4]

template<class Derived >
template<typename PointDerived , typename = typename std::enable_if< IsFixedSizeVector<PointDerived, 3>::value>::type>
SOPHUS_FUNC PointProduct<PointDerived> Sophus::Sim3Base< Derived >::operator* ( Eigen::MatrixBase< PointDerived > const &  p) const
inline

Group action on 3-points.

This function rotates, scales and translates a three dimensional point p by the Sim(3) element (bar_sR_foo, t_bar) (= similarity transformation):

p_bar = bar_sR_foo * p_foo + t_bar.

Definition at line 230 of file sim3.hpp.

◆ operator*() [3/4]

template<class Derived >
SOPHUS_FUNC Line Sophus::Sim3Base< Derived >::operator* ( Line const &  l) const
inline

Group action on lines.

This function rotates, scales and translates a parametrized line l(t) = o + t * d by the Sim(3) element:

Origin o is rotated, scaled and translated Direction d is rotated

Definition at line 255 of file sim3.hpp.

◆ operator*() [4/4]

template<class Derived >
template<typename OtherDerived >
SOPHUS_FUNC Sim3Product<OtherDerived> Sophus::Sim3Base< Derived >::operator* ( Sim3Base< OtherDerived > const &  other) const
inline

Group multiplication, which is rotation plus scaling concatenation.

Note: That scaling is calculated with saturation. See RxSO3 for details.

Definition at line 213 of file sim3.hpp.

◆ operator*=()

template<class Derived >
template<typename OtherDerived , typename = typename std::enable_if< std::is_same<Scalar, ReturnScalar<OtherDerived>>::value>::type>
SOPHUS_FUNC Sim3Base<Derived>& Sophus::Sim3Base< Derived >::operator*= ( Sim3Base< OtherDerived > const &  other)
inline

In-place group multiplication. This method is only valid if the return type of the multiplication is compatible with this SO3's Scalar type.

Definition at line 266 of file sim3.hpp.

◆ operator=() [1/2]

template<class Derived >
SOPHUS_FUNC Sim3Base& Sophus::Sim3Base< Derived >::operator= ( Sim3Base< Derived > const &  other)
default

Assignment operator.

◆ operator=() [2/2]

template<class Derived >
template<class OtherDerived >
SOPHUS_FUNC Sim3Base<Derived>& Sophus::Sim3Base< Derived >::operator= ( Sim3Base< OtherDerived > const &  other)
inline

Assignment-like operator from OtherDerived.

Definition at line 200 of file sim3.hpp.

◆ params()

template<class Derived >
SOPHUS_FUNC Sophus::Vector<Scalar, num_parameters> Sophus::Sim3Base< Derived >::params ( ) const
inline

Returns internal parameters of Sim(3).

It returns (q.imag[0], q.imag[1], q.imag[2], q.real, t[0], t[1], t[2]), with q being the quaternion, t the translation 3-vector.

Definition at line 277 of file sim3.hpp.

◆ quaternion()

template<class Derived >
SOPHUS_FUNC QuaternionType const& Sophus::Sim3Base< Derived >::quaternion ( ) const
inline

Accessor of quaternion.

Definition at line 293 of file sim3.hpp.

◆ rotationMatrix()

template<class Derived >
SOPHUS_FUNC Matrix3<Scalar> Sophus::Sim3Base< Derived >::rotationMatrix ( ) const
inline

Returns Rotation matrix

Definition at line 299 of file sim3.hpp.

◆ rxso3() [1/2]

template<class Derived >
SOPHUS_FUNC RxSO3Type& Sophus::Sim3Base< Derived >::rxso3 ( )
inline

Mutator of SO3 group.

Definition at line 305 of file sim3.hpp.

◆ rxso3() [2/2]

template<class Derived >
SOPHUS_FUNC RxSO3Type const& Sophus::Sim3Base< Derived >::rxso3 ( ) const
inline

Accessor of SO3 group.

Definition at line 311 of file sim3.hpp.

◆ scale()

template<class Derived >
SOPHUS_FUNC Scalar Sophus::Sim3Base< Derived >::scale ( ) const
inline

Returns scale.

Definition at line 317 of file sim3.hpp.

◆ setQuaternion()

template<class Derived >
SOPHUS_FUNC void Sophus::Sim3Base< Derived >::setQuaternion ( Eigen::Quaternion< Scalar > const &  quat)
inline

Setter of non-zero quaternion.

Precondition: quat must not be close to zero.

Definition at line 287 of file sim3.hpp.

◆ setRotationMatrix()

template<class Derived >
SOPHUS_FUNC void Sophus::Sim3Base< Derived >::setRotationMatrix ( Matrix3< Scalar > &  R)
inline

Setter of quaternion using rotation matrix R, leaves scale as is.

Definition at line 321 of file sim3.hpp.

◆ setScale()

template<class Derived >
SOPHUS_FUNC void Sophus::Sim3Base< Derived >::setScale ( Scalar const &  scale)
inline

Sets scale and leaves rotation as is.

Note: This function as a significant computational cost, since it has to call the square root twice.

Definition at line 330 of file sim3.hpp.

◆ setScaledRotationMatrix()

template<class Derived >
SOPHUS_FUNC void Sophus::Sim3Base< Derived >::setScaledRotationMatrix ( Matrix3< Scalar > const &  sR)
inline

Setter of quaternion using scaled rotation matrix sR.

Precondition: The 3x3 matrix must be "scaled orthogonal" and have a positive determinant.

Definition at line 337 of file sim3.hpp.

◆ translation() [1/2]

template<class Derived >
SOPHUS_FUNC TranslationType& Sophus::Sim3Base< Derived >::translation ( )
inline

Mutator of translation vector

Definition at line 343 of file sim3.hpp.

◆ translation() [2/2]

template<class Derived >
SOPHUS_FUNC TranslationType const& Sophus::Sim3Base< Derived >::translation ( ) const
inline

Accessor of translation vector

Definition at line 349 of file sim3.hpp.

Member Data Documentation

◆ DoF

template<class Derived >
constexpr int Sophus::Sim3Base< Derived >::DoF = 7
staticconstexpr

Degrees of freedom of manifold, number of dimensions in tangent space (three for translation, three for rotation and one for scaling).

Definition at line 69 of file sim3.hpp.

◆ N

template<class Derived >
constexpr int Sophus::Sim3Base< Derived >::N = 4
staticconstexpr

Group transformations are 4x4 matrices.

Definition at line 74 of file sim3.hpp.

◆ num_parameters

template<class Derived >
constexpr int Sophus::Sim3Base< Derived >::num_parameters = 7
staticconstexpr

Number of internal parameters used (4-tuple for quaternion, three for translation).

Definition at line 72 of file sim3.hpp.


The documentation for this class was generated from the following file:


sophus
Author(s): Hauke Strasdat
autogenerated on Wed Mar 2 2022 01:01:48