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

Detailed Description

Represents an element of the 3D Galilean group SGal(3).

Internal state: rotation, translation, velocity, time.

Inheritance diagram for gtsam::Gal3:

Matrix Lie Group

using LieAlgebra = Matrix5
using Vector25 = Eigen::Matrix<double, 25, 1>
Matrix5 matrix () const
 Return 5x5 homogeneous matrix representation.
Vector25 vec (OptionalJacobian< 25, 10 > H={}) const
 Vectorize 5x5 matrix into a 25-dim vector.
static LieAlgebra Hat (const TangentVector &xi)
 Hat operator: maps tangent vector xi to Lie algebra matrix.
static TangentVector Vee (const LieAlgebra &X)
 Vee operator: maps Lie algebra matrix to tangent vector xi.

Constructors

 Gal3 ()
 Default constructor: Identity element.
 Gal3 (const Rot3 &R, const Point3 &r, const Velocity3 &v, double t)
 Construct from attitude, position, velocity, time.
 Gal3 (const Matrix5 &M)
 Construct from a 5x5 matrix representation.
static Gal3 Create (const Rot3 &R, const Point3 &r, const Velocity3 &v, double t, OptionalJacobian< 10, 3 > H1={}, OptionalJacobian< 10, 3 > H2={}, OptionalJacobian< 10, 3 > H3={}, OptionalJacobian< 10, 1 > H4={})
 Named constructor from components with derivatives.
static Gal3 FromPoseVelocityTime (const Pose3 &pose, const Velocity3 &v, double t, OptionalJacobian< 10, 6 > H1={}, OptionalJacobian< 10, 3 > H2={}, OptionalJacobian< 10, 1 > H3={})
 Named constructor from Pose3, velocity, and time with derivatives.

Testable

void print (const std::string &s="") const
 Print with optional string prefix.
bool equals (const Gal3 &other, double tol=1e-9) const
 Check equality within tolerance.
GTSAM_EXPORT friend std::ostream & operator<< (std::ostream &os, const Gal3 &state)
 Output stream operator.

Group

Gal3 inverse () const
 Return the inverse of this element.
Gal3 operator* (const Gal3 &other) const
 Group composition operator.
static Gal3 Identity ()
 Return the identity element.

Lie Group

Jacobian AdjointMap () const
 Calculate Adjoint map Ad_g.
static Gal3 Expmap (const TangentVector &xi, OptionalJacobian< 10, 10 > Hxi={})
 Exponential map at identity: tangent vector xi -> manifold element g.
static TangentVector Logmap (const Gal3 &g, OptionalJacobian< 10, 10 > Hg={})
 Logarithmic map at identity: manifold element g -> tangent vector xi.
static Jacobian adjointMap (const TangentVector &xi)
 Compute the adjoint map ad(xi) associated with tangent vector xi.
static Jacobian ExpmapDerivative (const TangentVector &xi)
 Derivative of Expmap(xi) w.r.t. xi evaluated at xi.
static Jacobian LogmapDerivative (const Gal3 &g)
 Derivative of Logmap(g) w.r.t. g.
static Jacobian LogmapDerivative (const TangentVector &xi)
 Derivative of Logmap(g), tangent version.

Public Member Functions

Component Access
const Rot3 & rotation (OptionalJacobian< 3, 10 > H={}) const
 Access rotation component (Rot3).
const Point3 & translation (OptionalJacobian< 3, 10 > H={}) const
 Access translation component (Point3).
const Velocity3 & velocity (OptionalJacobian< 3, 10 > H={}) const
 Access velocity component (Vector3).
const double & time (OptionalJacobian< 1, 10 > H={}) const
 Access time component (double).
const Rot3 & attitude (OptionalJacobian< 3, 10 > H={}) const
const Point3 & position (OptionalJacobian< 3, 10 > H={}) const
Derived quantities
Matrix3 R () const
 Return rotation matrix (Matrix3).
Vector3 r () const
 Return position as Vector3.
const Vector3 & v () const
 Return velocity as Vector3.
const double & t () const
 Return time scalar.
double range (const Point3 &point, OptionalJacobian< 1, 10 > Hself={}, OptionalJacobian< 1, 3 > Hpoint={}) const
 Calculate range to a 3D landmark.
Unit3 bearing (const Point3 &point, OptionalJacobian< 2, 10 > Hself={}, OptionalJacobian< 2, 3 > Hpoint={}) const
 Calculate bearing to a 3D landmark.
Group Action
Event act (const Event &e, OptionalJacobian< 4, 10 > Hself={}, OptionalJacobian< 4, 4 > He={}) const
 Apply Galilean transform to a spacetime Event.
Public Member Functions inherited from gtsam::MatrixLieGroup< Gal3, 10, 5 >
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< Gal3, 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 Gal3 & derived () const
Gal3 inverse (ChartJacobian H) const
Gal3 expmap (const TangentVector &v) const
 expmap as required by manifold concept Applies exponential map to v and composes with *this
TangentVector logmap (const Gal3 &g) const
 logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Gal3 retract (const TangentVector &v) const
 retract as required by manifold concept: applies v at *this
TangentVector localCoordinates (const Gal3 &g) const
 localCoordinates as required by manifold concept: finds tangent vector between *this and g

Classes

struct  ChartAtOrigin
 Chart at origin, uses Expmap/Logmap for Retract/Local. More...

Additional Inherited Members

Static Public Member Functions inherited from gtsam::MatrixLieGroup< Gal3, 10, 5 >
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< Gal3, D >
static constexpr int Dim ()
 Static method to get the dimension (compile-time or dynamic).
static Gal3 Retract (const TangentVector &v)
 Retract at origin: possible in Lie group because it has an identity.
static TangentVector LocalCoordinates (const Gal3 &g)
 LocalCoordinates at origin: possible in Lie group because it has an identity.
Static Public Attributes inherited from gtsam::MatrixLieGroup< Gal3, 10, 5 >
static constexpr auto dimension
Static Public Attributes inherited from gtsam::LieGroup< Gal3, D >
static constexpr auto dimension
Public Types inherited from gtsam::MatrixLieGroup< Gal3, 10, 5 >
using Base
using ChartJacobian
using Jacobian
using TangentVector
using Vectorized
using VectorizedJacobian
Public Types inherited from gtsam::LieGroup< Gal3, D >
typedef OptionalJacobian< N, N > ChartJacobian
typedef Eigen::Matrix< double, N, N > Jacobian
typedef Eigen::Matrix< double, N, 1 > TangentVector

Member Function Documentation

◆ act()

Event gtsam::Gal3::act ( const Event & e,
OptionalJacobian< 4, 10 > Hself = {},
OptionalJacobian< 4, 4 > He = {} ) const

Apply Galilean transform to a spacetime Event.

Parameters
eInput event (location, time)
HselfOptional Jacobian wrt this Gal3 element's tangent space
HeOptional Jacobian wrt the input event's tangent space
Returns
Transformed event

◆ bearing()

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

Calculate bearing to a 3D landmark.

Parameters
point3D location of landmark
Returns
bearing (Unit3)

◆ range()

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

Calculate range to a 3D landmark.

Parameters
point3D location of landmark
Returns
range (double)

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