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

Detailed Description

A 3D pose (R,t) : (Rot3,Point3).

Inheritance diagram for gtsam::Pose3:

Lie Group

using LieAlgebra = Matrix4
static Pose3 Expmap (const Vector6 &xi, OptionalJacobian< 6, 6 > Hxi={})
 Exponential map at identity.
static Matrix6 adjointMap_ (const Vector6 &xi)
static Vector6 adjoint_ (const Vector6 &xi, const Vector6 &y)

Standard Constructors

 Pose3 ()
 Default constructor is origin.
 Pose3 (const Pose3 &pose)=default
 Copy constructor.
Pose3 & operator= (const Pose3 &other)=default
 Pose3 (const Base &other)
 Pose3 (const Rot3 &R, const Point3 &t)
 Construct from R,t.
 Pose3 (const Pose2 &pose2)
 Construct from Pose2.
 Pose3 (const Matrix &T)
 Constructor from 4*4 matrix.
static Pose3 Create (const Rot3 &R, const Point3 &t, OptionalJacobian< 6, 3 > HR={}, OptionalJacobian< 6, 3 > Ht={})
 Named constructor with derivatives.
static Pose3 FromPose2 (const Pose2 &p, OptionalJacobian< 6, 3 > H={})
 Construct from Pose2 in the xy plane, with derivative.
static std::optional< Pose3 > Align (const Point3Pairs &abPointPairs)
 Create Pose3 by aligning two point pairs A pose aTb is estimated between pairs (a_point, b_point) such that a_point = aTb * b_point Note this allows for noise on the points but in that case the mapping will not be exact.
static std::optional< Pose3 > Align (ConstMatrixView a, ConstMatrixView b)

Testable

void print (const std::string &s="") const
 print with optional string
bool equals (const Pose3 &pose, double tol=1e-9) const
 assert equality up to a tolerance

Group

Pose3 interpolateRt (const Pose3 &T, double t, OptionalJacobian< 6, 6 > Hself={}, OptionalJacobian< 6, 6 > Harg={}, OptionalJacobian< 6, 1 > Ht={}) const
 Interpolate between two poses via individual rotation and translation interpolation.
Pose3 operator* (const Pose3 &T) const
 Compose syntactic sugar.

Group Action on Point3

Point3 transformFrom (const Point3 &point, OptionalJacobian< 3, 6 > Hself={}, OptionalJacobian< 3, 3 > Hpoint={}) const
 takes point in Pose coordinates and transforms it to world coordinates
Matrix transformFrom (ConstMatrixView points) const
 transform many points in Pose coordinates and transform to world.
Point3 operator* (const Point3 &point) const
 syntactic sugar for transformFrom
Point3 transformTo (const Point3 &point, OptionalJacobian< 3, 6 > Hself={}, OptionalJacobian< 3, 3 > Hpoint={}) const
 takes point in world coordinates and transforms it to Pose coordinates
Matrix transformTo (ConstMatrixView points) const
 transform many points in world coordinates and transform to Pose.

Standard Interface

const Point3 & translation (OptionalJacobian< 3, 6 > Hself={}) const
 get translation
double x () const
 get x
double y () const
 get y
double z () const
 get z
Pose3 transformPoseFrom (const Pose3 &aTb, OptionalJacobian< 6, 6 > Hself={}, OptionalJacobian< 6, 6 > HaTb={}) const
 Assuming self == wTa, takes a pose aTb in local coordinates and transforms it to world coordinates wTb = wTa * aTb.
Pose3 transformPoseTo (const Pose3 &wTb, OptionalJacobian< 6, 6 > Hself={}, OptionalJacobian< 6, 6 > HwTb={}) const
 Assuming self == wTa, takes a pose wTb in world coordinates and transforms it to local coordinates aTb = inv(wTa) * wTb.
double range (const Point3 &point, OptionalJacobian< 1, 6 > Hself={}, OptionalJacobian< 1, 3 > Hpoint={}) const
 Calculate range to a landmark.
double range (const Pose3 &pose, OptionalJacobian< 1, 6 > Hself={}, OptionalJacobian< 1, 6 > Hpose={}) const
 Calculate range to another pose.
Unit3 bearing (const Point3 &point, OptionalJacobian< 2, 6 > Hself={}, OptionalJacobian< 2, 3 > Hpoint={}) const
 Calculate bearing to a landmark.
Unit3 bearing (const Pose3 &pose, OptionalJacobian< 2, 6 > Hself={}, OptionalJacobian< 2, 6 > Hpose={}) const
 Calculate bearing to another pose.

Advanced Interface

Pose3 slerp (double t, const Pose3 &other, OptionalJacobian< 6, 6 > Hx={}, OptionalJacobian< 6, 6 > Hy={}) const
 Spherical Linear interpolation between *this and other.
static std::pair< size_t, size_t > translationInterval ()
 Return the start and end indices (inclusive) of the translation component of the exponential map parameterization.
static std::pair< size_t, size_t > rotationInterval ()
 Return the start and end indices (inclusive) of the rotation component of the exponential map parameterization.
GTSAM_EXPORT friend std::ostream & operator<< (std::ostream &os, const Pose3 &p)
 Output stream operator.

Public Member Functions

This operator* (const This &other) const
 Group composition.
Public Member Functions inherited from gtsam::ExtendedPose3< 1, Pose3 >
 ExtendedPose3 ()
 Construct a fixed-size identity element.
 ExtendedPose3 (size_t k=0)
 Construct a dynamic-size identity element.
 ExtendedPose3 (const ExtendedPose3 &)=default
 Copy constructor.
ExtendedPose3 & operator= (const ExtendedPose3 &)=default
 Copy assignment.
 ExtendedPose3 (const Rot3 &R, const Matrix3K &x)
 Construct from rotation and 3xk block.
 ExtendedPose3 (const Rot3 &R, const Vecs &... xs)
 Construct a fixed-size state from rotation and K 3-vectors.
 ExtendedPose3 (const MatrixRep &T)
 Construct from homogeneous matrix representation.
void print (const std::string &s="") const
 Print this state.
bool equals (const ExtendedPose3 &other, double tol=1e-9) const
 Equality check with tolerance.
size_t k () const
size_t dim () const
const Rot3 & rotation (ComponentJacobian H={}) const
 Rotation component.
Point3 x (size_t i, ComponentJacobian H={}) const
 i-th R^3 component, returned by value.
const Matrix3K & xMatrix () const
 Access all x_i blocks.
Matrix3K & xMatrix ()
 Mutable access to all x_i blocks.
This inverse () const
 Group inverse.
This operator* (const This &other) const
 Group composition.
Jacobian AdjointMap () const
 Adjoint map.
MatrixRep matrix () const
 Homogeneous matrix representation.
Public Member Functions inherited from gtsam::MatrixLieGroup< Class, D, N >
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< Class, D >
std::enable_if_t< M !=Eigen::Dynamic, int > dim () const
 Provided fixed dimension in dim() if needed.
const Class & derived () const
Class compose (const Class &g) const
Class between (const Class &g) const
Class compose (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
Class between (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
Class inverse (ChartJacobian H) const
Class expmap (const TangentVector &v) const
 expmap as required by manifold concept Applies exponential map to v and composes with *this
TangentVector logmap (const Class &g) const
 logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Class expmap (const TangentVector &v, ChartJacobian H1, ChartJacobian H2={}) const
 expmap with optional derivatives, when the class provides them
TangentVector logmap (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
 logmap with optional derivatives, when the class provides them
Class retract (const TangentVector &v) const
 retract as required by manifold concept: applies v at *this
TangentVector localCoordinates (const Class &g) const
 localCoordinates as required by manifold concept: finds tangent vector between *this and g
Class retract (const TangentVector &v, ChartJacobian H1, ChartJacobian H2={}) const
 retract with optional derivatives, when the chart provides them
TangentVector localCoordinates (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
 localCoordinates with optional derivatives, when the chart provides them
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

Static Public Attributes

static constexpr auto dimension = 6
Static Public Attributes inherited from gtsam::ExtendedPose3< 1, Pose3 >
static constexpr int K
static constexpr int dimension
static constexpr int matrixDim
Static Public Attributes inherited from gtsam::MatrixLieGroup< Class, D, N >
static constexpr auto dimension
Static Public Attributes inherited from gtsam::LieGroup< Class, D >
static constexpr auto dimension

Public Types

using Base = ExtendedPose3<1, Pose3>
typedef Rot3 Rotation
 Pose Concept requirements.
typedef Point3 Translation
using Vector16 = Eigen::Matrix<double, 16, 1>
Public Types inherited from gtsam::ExtendedPose3< 1, Pose3 >
using This
using Base
using TangentVector
using Jacobian
using ChartJacobian
using ComponentJacobian
using MatrixRep
 Homogeneous matrix representation in the group.
using LieAlgebra
 Lie algebra matrix type used by Hat/Vee.
using Matrix3K
Public Types inherited from gtsam::MatrixLieGroup< Class, D, N >
using Base = LieGroup<Class, D>
using ChartJacobian = typename Base::ChartJacobian
using Jacobian = typename Base::Jacobian
using TangentVector = typename Base::TangentVector
using Vectorized = Eigen::Matrix<double, internal::product(N, N), 1>
using VectorizedJacobian
Public Types inherited from gtsam::LieGroup< Class, D >
typedef OptionalJacobian< N, N > ChartJacobian
typedef Eigen::Matrix< double, N, N > Jacobian
typedef Eigen::Matrix< double, N, 1 > TangentVector

Classes

struct  ChartAtOrigin

Additional Inherited Members

static size_t Dimension (size_t k)
 Runtime manifold dimension helper.
static This Identity ()
 Identity element for fixed-size K.
static This Identity (size_t k=0)
 Identity element for dynamic-size K.
static This Expmap (const TangentVector &xi, ChartJacobian Hxi={})
 Exponential map from tangent to group.
static TangentVector Logmap (const This &pose, ChartJacobian Hpose={})
 Logarithm map from group to tangent.
static Jacobian adjointMap (const TangentVector &xi)
 Lie algebra adjoint map.
static Jacobian ExpmapDerivative (const TangentVector &xi)
 Jacobian of Expmap.
static Jacobian LogmapDerivative (const TangentVector &xi)
 Jacobian of Logmap evaluated from tangent coordinates.
static Jacobian LogmapDerivative (const This &pose)
 Jacobian of Logmap evaluated at a group element.
static LieAlgebra Hat (const TangentVector &xi)
 Hat operator from tangent to Lie algebra.
static TangentVector Vee (const LieAlgebra &X)
 Vee operator from Lie algebra to tangent.
Static Public Member Functions inherited from gtsam::MatrixLieGroup< Class, D, N >
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< Class, D >
static constexpr int Dim ()
 Static method to get the dimension (compile-time or dynamic).
static Class Retract (const TangentVector &v)
 Retract at origin: possible in Lie group because it has an identity.
static TangentVector LocalCoordinates (const Class &g)
 LocalCoordinates at origin: possible in Lie group because it has an identity.
static Class Retract (const TangentVector &v, ChartJacobian H)
 Retract at origin with optional derivative, when the chart provides it.
static TangentVector LocalCoordinates (const Class &g, ChartJacobian H)
 LocalCoordinates at origin with optional derivative, when provided.
Protected Types inherited from gtsam::ExtendedPose3< 1, Pose3 >
using IsDynamic
using IsFixed
Static Protected Member Functions inherited from gtsam::ExtendedPose3< 1, Pose3 >
static This MakeReturn (const ExtendedPose3 &value)
static const ExtendedPose3 & AsBase (const This &value)
static size_t RuntimeK (const TangentVector &xi)
static void ZeroJacobian (ChartJacobian H, Eigen::Index d)
Protected Attributes inherited from gtsam::ExtendedPose3< 1, Pose3 >
Rot3 R_
 Rotation component.
Matrix3K t_
 K translation-like columns in world frame.

Constructor & Destructor Documentation

◆ Pose3()

gtsam::Pose3::Pose3 ( const Pose2 & pose2)
explicit

Construct from Pose2.

instantiate concept checks

Member Function Documentation

◆ bearing() [1/2]

Unit3 gtsam::Pose3::bearing ( const Point3 & point,
OptionalJacobian< 2, 6 > Hself = {},
OptionalJacobian< 2, 3 > Hpoint = {} ) const

Calculate bearing to a landmark.

Parameters
point3D location of landmark
Returns
bearing (Unit3)

◆ bearing() [2/2]

Unit3 gtsam::Pose3::bearing ( const Pose3 & pose,
OptionalJacobian< 2, 6 > Hself = {},
OptionalJacobian< 2, 6 > Hpose = {} ) const

Calculate bearing to another pose.

Parameters
other3D location and orientation of other body. The orientation information is ignored.
Returns
bearing (Unit3)

◆ interpolateRt()

Pose3 gtsam::Pose3::interpolateRt ( const Pose3 & T,
double t,
OptionalJacobian< 6, 6 > Hself = {},
OptionalJacobian< 6, 6 > Harg = {},
OptionalJacobian< 6, 1 > Ht = {} ) const

Interpolate between two poses via individual rotation and translation interpolation.

The default "interpolate" method defined in Lie.h minimizes the geodesic distance on the manifold, leading to a screw motion interpolation in Cartesian space, which might not be what is expected. In contrast, this method executes a straight line interpolation for the translation, while still using interpolate (aka "slerp") for the rotational component. This might be more intuitive in many applications.

Parameters
TEnd point of interpolation.
tA value in [0, 1].

◆ operator*()

This gtsam::ExtendedPose3< K_, Pose3 >::operator* ( const This & other) const

Group composition.

Parameters
otherRight-hand operand with the same k.
Returns
this * other.

◆ range() [1/2]

double gtsam::Pose3::range ( const Point3 & point,
OptionalJacobian< 1, 6 > Hself = {},
OptionalJacobian< 1, 3 > Hpoint = {} ) const

Calculate range to a landmark.

Parameters
point3D location of landmark
Returns
range (double)

◆ range() [2/2]

double gtsam::Pose3::range ( const Pose3 & pose,
OptionalJacobian< 1, 6 > Hself = {},
OptionalJacobian< 1, 6 > Hpose = {} ) const

Calculate range to another pose.

Parameters
poseOther SO(3) pose
Returns
range (double)

◆ rotationInterval()

std::pair< size_t, size_t > gtsam::Pose3::rotationInterval ( )
inlinestatic

Return the start and end indices (inclusive) of the rotation component of the exponential map parameterization.

Returns
a pair of [start, end] indices into the tangent space vector

◆ slerp()

Pose3 gtsam::Pose3::slerp ( double t,
const Pose3 & other,
OptionalJacobian< 6, 6 > Hx = {},
OptionalJacobian< 6, 6 > Hy = {} ) const

Spherical Linear interpolation between *this and other.

Parameters
sa value between 0 and 1.5
otherfinal point of interpolation geodesic on manifold

◆ transformFrom() [1/2]

Point3 gtsam::Pose3::transformFrom ( const Point3 & point,
OptionalJacobian< 3, 6 > Hself = {},
OptionalJacobian< 3, 3 > Hpoint = {} ) const

takes point in Pose coordinates and transforms it to world coordinates

Parameters
pointpoint in Pose coordinates
Hselfoptional 3*6 Jacobian wrpt this pose
Hpointoptional 3*3 Jacobian wrpt point
Returns
point in world coordinates

◆ transformFrom() [2/2]

Matrix gtsam::Pose3::transformFrom ( ConstMatrixView points) const

transform many points in Pose coordinates and transform to world.

Parameters
points3*N matrix in Pose coordinates
Returns
points in world coordinates, as 3*N Matrix

◆ transformPoseFrom()

Pose3 gtsam::Pose3::transformPoseFrom ( const Pose3 & aTb,
OptionalJacobian< 6, 6 > Hself = {},
OptionalJacobian< 6, 6 > HaTb = {} ) const

Assuming self == wTa, takes a pose aTb in local coordinates and transforms it to world coordinates wTb = wTa * aTb.

This is identical to compose.

◆ transformTo() [1/2]

Point3 gtsam::Pose3::transformTo ( const Point3 & point,
OptionalJacobian< 3, 6 > Hself = {},
OptionalJacobian< 3, 3 > Hpoint = {} ) const

takes point in world coordinates and transforms it to Pose coordinates

Parameters
pointpoint in world coordinates
Hselfoptional 3*6 Jacobian wrpt this pose
Hpointoptional 3*3 Jacobian wrpt point
Returns
point in Pose coordinates

◆ transformTo() [2/2]

Matrix gtsam::Pose3::transformTo ( ConstMatrixView points) const

transform many points in world coordinates and transform to Pose.

Parameters
points3*N matrix in world coordinates
Returns
points in Pose coordinates, as 3*N Matrix

◆ translationInterval()

std::pair< size_t, size_t > gtsam::Pose3::translationInterval ( )
inlinestatic

Return the start and end indices (inclusive) of the translation component of the exponential map parameterization.

Returns
a pair of [start, end] indices into the tangent space vector

The documentation for this class was generated from the following files:
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/geometry/Pose3.h
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/geometry/Pose3.cpp