gtsam
Loading...
Searching...
No Matches
gtsam::Similarity3 Class Reference

Detailed Description

3D similarity transform

Inheritance diagram for gtsam::Similarity3:

Lie Group

using LieAlgebra = Matrix4
Matrix7 AdjointMap () const
 Project from one tangent space to another.
static Vector7 Logmap (const Similarity3 &s)
 Log map at the identity \( [R_x,R_y,R_z, t_x, t_y, t_z, \lambda] \).
static Similarity3 Expmap (const Vector7 &v)
 Exponential map at the identity.
static Matrix7 adjointMap (const Vector7 &xi)
 Compute the Lie algebra adjoint map associated with a tangent vector.
static Matrix4 Hat (const Vector7 &xi)
 Hat for Similarity3:
static Vector7 Vee (const Matrix4 &X)
 Vee maps from Lie algebra to tangent vector.

Testable

bool equals (const Similarity3 &sim, double tol) const
 Compare with tolerance.
bool operator== (const Similarity3 &other) const
 Exact equality.
void print (const std::string &s="") const
 Print with optional string.
GTSAM_EXPORT friend std::ostream & operator<< (std::ostream &os, const Similarity3 &p)

Group

Similarity3 operator* (const Similarity3 &S) const
 Composition.
Similarity3 inverse () const
 Return the inverse.
static Similarity3 Identity ()
 Return an identity transform.

Group action on Point3

Point3 transformFrom (const Point3 &p, OptionalJacobian< 3, 7 > H1={}, OptionalJacobian< 3, 3 > H2={}) const
 Action on a point p is s*(R*p+t).
Pose3 transformFrom (const Pose3 &T, OptionalJacobian< 6, 7 > H1={}, OptionalJacobian< 6, 6 > H2={}) const
 Action on a pose T.
Point3 operator* (const Point3 &p) const
 syntactic sugar for transformFrom
static Similarity3 Align (const Point3Pairs &abPointPairs)
 Create Similarity3 by aligning at least three point pairs.
static Similarity3 Align (const Pose3Pairs &abPosePairs)
 Create the Similarity3 object that aligns at least two pose pairs.

Public Member Functions

Constructors
 Similarity3 ()
 Default constructor.
 Similarity3 (double s)
 Construct pure scaling.
 Similarity3 (const Rot3 &R, const Point3 &t, double s)
 Construct from GTSAM types.
 Similarity3 (const Matrix3 &R, const Vector3 &t, double s)
 Construct from Eigen types.
 Similarity3 (const Matrix4 &T)
 Construct from matrix [R t; 0 s^-1].
Standard interface
Matrix4 matrix () const
 Calculate 4*4 matrix group equivalent.
Rot3 rotation (OptionalJacobian< 3, 7 > Hself={}) const
 Return a rotation.
Point3 translation (OptionalJacobian< 3, 7 > Hself={}) const
 Return a translation with pushforward.
double scale (OptionalJacobian< 1, 7 > Hself={}) const
 Return the scale.
Public Member Functions inherited from gtsam::MatrixLieGroup< Similarity3, 7, 4 >
std::enable_if_t< M !=Eigen::Dynamic, int > dim () const
 Provided fixed dimension in dim() if needed.
Eigen::Matrix< double, internal::product(N, N), 1 > vec (OptionalJacobian< internal::product(N, N), D > H={}) const
 Vectorize the matrix representation of a Lie group element.
Jacobian AdjointMap () const
 A generic implementation of AdjointMap for matrix Lie groups.
TangentVector Adjoint (const TangentVector &xi, ChartJacobian H_this={}, ChartJacobian H_xi={}) const
 Adjoint action on a tangent vector.
TangentVector AdjointTranspose (const TangentVector &x, ChartJacobian H_this={}, ChartJacobian H_x={}) const
 Dual Adjoint action on a tangent covector.
Public Member Functions inherited from gtsam::LieGroup< Similarity3, D >
SOn compose (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
SOn between (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
GTSAM_EXPORT SOn compose (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
GTSAM_EXPORT SOn between (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
std::enable_if_t< M !=Eigen::Dynamic, int > dim () const
 Provided fixed dimension in dim() if needed.
const Similarity3 & derived () const
Similarity3 inverse (ChartJacobian H) const
Similarity3 expmap (const TangentVector &v) const
 expmap as required by manifold concept Applies exponential map to v and composes with *this
TangentVector logmap (const Similarity3 &g) const
 logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Similarity3 retract (const TangentVector &v) const
 retract as required by manifold concept: applies v at *this
TangentVector localCoordinates (const Similarity3 &g) const
 localCoordinates as required by manifold concept: finds tangent vector between *this and g

Public Types

using Vector16 = Eigen::Matrix<double, 16, 1>
Pose Concept
typedef Rot3 Rotation
typedef Point3 Translation
Public Types inherited from gtsam::MatrixLieGroup< Similarity3, 7, 4 >
using Base
using ChartJacobian
using Jacobian
using TangentVector
using Vectorized
using VectorizedJacobian
Public Types inherited from gtsam::LieGroup< Similarity3, D >
typedef OptionalJacobian< N, N > ChartJacobian
typedef Eigen::Matrix< double, N, N > Jacobian
typedef Eigen::Matrix< double, N, 1 > TangentVector

Classes

struct  ChartAtOrigin
 Chart at the origin. More...

Additional Inherited Members

Static Public Member Functions inherited from gtsam::MatrixLieGroup< Similarity3, 7, 4 >
static constexpr int Dim ()
 Static method to get the dimension (compile-time or dynamic).
static Jacobian adjointMap (const TangentVector &xi)
 Lie algebra adjoint map ad_xi, with optional specialization in derived classes.
static TangentVector adjoint (const TangentVector &xi, const TangentVector &y, ChartJacobian Hxi={}, ChartJacobian H_y={})
 Lie algebra action ad_xi(y), with optional Jacobians.
static TangentVector adjointTranspose (const TangentVector &xi, const TangentVector &y, ChartJacobian Hxi={}, ChartJacobian H_y={})
 Dual Lie algebra action ad_xi^T(y), with optional Jacobians.
Static Public Member Functions inherited from gtsam::LieGroup< Similarity3, D >
static constexpr int Dim ()
 Static method to get the dimension (compile-time or dynamic).
static Similarity3 Retract (const TangentVector &v)
 Retract at origin: possible in Lie group because it has an identity.
static TangentVector LocalCoordinates (const Similarity3 &g)
 LocalCoordinates at origin: possible in Lie group because it has an identity.
Static Public Attributes inherited from gtsam::MatrixLieGroup< Similarity3, 7, 4 >
static constexpr auto dimension
Static Public Attributes inherited from gtsam::LieGroup< Similarity3, D >
static constexpr auto dimension

Member Function Documentation

◆ Align()

Similarity3 gtsam::Similarity3::Align ( const Pose3Pairs & abPosePairs)
static

Create the Similarity3 object that aligns at least two pose pairs.

Each pair is of the form (aTi, bTi). Given a list of pairs in frame a, and a list of pairs in frame b, Align() will compute the best-fit Similarity3 aSb transformation to align them. First, the rotation aRb will be computed as the average (Karcher mean) of many estimates aRb (from each pair). Afterwards, the scale factor will be computed using the algorithm described here: http://www5.informatik.uni-erlangen.de/Forschung/Publikationen/2005/Zinsser05-PSR.pdf

◆ Hat()

Matrix4 gtsam::Similarity3::Hat ( const Vector7 & xi)
static

Hat for Similarity3:

Parameters
xi7-dim twist (w,u,lambda) where
Returns
4*4 element of Lie algebra that can be exponentiated

◆ transformFrom()

Pose3 gtsam::Similarity3::transformFrom ( const Pose3 & T,
OptionalJacobian< 6, 7 > H1 = {},
OptionalJacobian< 6, 6 > H2 = {} ) const

Action on a pose T.

|Rs ts| |R t| |Rs*R Rs*t+ts| |0 1/s| * |0 1| = | 0 1/s |, the result is still a Sim3 object. To retrieve a Pose3, we normalized the scale value into 1. |Rs*R Rs*t+ts| |Rs*R s(Rs*t+ts)| | 0 1/s | = | 0 1 |

This group action satisfies the compatibility condition. For more details, refer to: https://en.wikipedia.org/wiki/Group_action


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