Class sym::Pose3

template<typename ScalarType>
class Pose3

Autogenerated C++ implementation of symforce.geo.pose3.Pose3.

Group of three-dimensional rigid body transformations - SO(3) x R3.

The storage is a quaternion (x, y, z, w) for rotation followed by position (x, y, z).

The tangent space is 3 elements for rotation followed by 3 elements for translation in the non-rotated frame.

For Lie group enthusiasts: This class is on the PRODUCT manifold. On this class, the group operations (e.g. compose and between) operate as you’d expect for a Pose or SE(3), but the manifold operations (e.g. retract and local_coordinates) operate on the product manifold SO(3) x R3. This means that:

  • retract(a, vec) != compose(a, from_tangent(vec))

  • local_coordinates(a, b) != to_tangent(between(a, b))

  • There is no hat operator, because from_tangent/to_tangent is not the matrix exp/log

If you need a type that has these properties in symbolic expressions, you should use :class:symforce.geo.unsupported.pose3_se3.Pose3_SE3. There is no runtime equivalent of :class:Pose3_SE3 <symforce.geo.unsupported.pose3_se3.Pose3_SE3>, see the docstring on that class for more information.

Public Types

using Scalar = ScalarType
using Self = Pose3<Scalar>
using DataVec = Eigen::Matrix<Scalar, 7, 1>
using TangentVec = Eigen::Matrix<Scalar, 6, 1>
using SelfJacobian = Eigen::Matrix<Scalar, 6, 6>
using Vector3 = Eigen::Matrix<Scalar, 3, 1>

Public Functions

inline explicit Pose3(const DataVec &data, const bool normalize = true)

Construct from data vec

Parameters:

normalize – Project to the manifold on construction. This ensures numerical stability as this constructor is called after each codegen operation. Constructing from a normalized vector may be faster, e.g. with FromStorage.

inline Pose3()
inline const DataVec &Data() const
template<typename Derived>
inline Pose3(const Rot3<Scalar> &rotation, const Eigen::MatrixBase<Derived> &position)
inline Eigen::Transform<Scalar, 3, Eigen::TransformTraits::Isometry> ToTransform() const
inline sym::Rot3<Scalar> Rotation() const
const Eigen::Matrix<Scalar, 4, 1> RotationStorage() const

Returns the rotational component of this pose.

const Vector3 Position() const

Returns the positional component of this pose.

const Vector3 ComposeWithPoint(const Vector3 &right) const

Left-multiply with a compatible quantity.

const Vector3 InverseCompose(const Vector3 &point) const

Returns self.inverse() * point

This is more efficient than calling the generated inverse and compose methods separately, if doing this for one point.

const Eigen::Matrix<Scalar, 4, 4> ToHomogenousMatrix() const

4x4 matrix representing this pose transform.

inline void ToStorage(Scalar *const vec) const
inline Self Inverse() const
inline Self Compose(const Self &b) const
inline Vector3 Compose(const Vector3 &point) const
inline Self Between(const Self &b) const
inline Self InverseWithJacobian(SelfJacobian *const res_D_a = nullptr) const
inline Self ComposeWithJacobians(const Self &b, SelfJacobian *const res_D_a = nullptr, SelfJacobian *const res_D_b = nullptr) const
inline Self BetweenWithJacobians(const Self &b, SelfJacobian *const res_D_a = nullptr, SelfJacobian *const res_D_b = nullptr) const
template<typename Other>
inline auto operator*(const Other &b) const -> decltype(Compose(b))
inline TangentVec ToTangent(const Scalar epsilon = kDefaultEpsilon<Scalar>) const
inline Self Retract(const TangentVec &vec, const Scalar epsilon = kDefaultEpsilon<Scalar>) const
inline TangentVec LocalCoordinates(const Self &b, const Scalar epsilon = kDefaultEpsilon<Scalar>) const
inline Self Interpolate(const Self b, const Scalar alpha, const Scalar epsilon = kDefaultEpsilon<Scalar>) const
inline bool IsApprox(const Self &b, const Scalar tol) const
template<typename ToScalar>
inline Pose3<ToScalar> Cast() const
inline bool operator==(const Pose3 &rhs) const
inline bool operator!=(const Pose3 &rhs) const

Public Static Functions

template<typename Generator>
static inline Pose3 Random(Generator &gen)
static inline constexpr int32_t StorageDim()
static inline Pose3 FromStorage(const Scalar *const vec)
static inline Self Identity()
static inline constexpr int32_t TangentDim()
static inline Self FromTangent(const TangentVec &vec, const Scalar epsilon = kDefaultEpsilon<Scalar>)