Valkyrie 2026
Loading...
Searching...
No Matches
valor::geometry::Pose3d Class Reference

Represents a 3D pose as a 4x4 homogeneous transformation matrix. More...

#include <valkyrie/util/geometry/Pose.h>

Inheritance diagram for valor::geometry::Pose3d:
valor::EigenUnit::NamedPhysicalMatrix< Pose3d, EigenUnit::PhysicalMatrix< HomogeneousVector3d, HomogeneousVector3d > > valor::EigenUnit::UnitMatrix< typename VecOut::UnitTuple, typename VecIn::UnitTuple >

Public Types

using Twist3d = EigenUnit::UnitVector<units::meter, units::meter, units::meter, units::radian, units::radian, units::radian>

Public Member Functions

 Pose3d (const BaseMatrix &b)
 Pose3d (Translation3d trans, Rotation3d rot)
 Construct a Pose3d from a translation and rotation.
 Pose3d (const Pose2d &pose)
 Construct a Pose3d from a Pose2d in the X-Y plane.
 Pose3d (frc::Translation3d frcTrans, frc::Rotation3d frcRot)
 Construct a Pose3d from an frc::Translation3d and frc::Rotation3d.
 Pose3d (frc::Pose3d frcPose)
 Construct a Pose3d from an frc::Pose3d.
 Pose3d (frc::Pose2d frcPose)
 Construct a Pose3d from an frc::Pose2d, lifting into 3D. Z is set to zero and pitch and roll are set to zero.
Translation3d Translation () const
Rotation3d Rotation () const
units::meter_t X () const
units::meter_t Y () const
units::meter_t Z () const
Pose2d ToPose2d () const
 Project this pose onto the X-Y plane.
Pose3d TransformBy (const Transform3d &transform) const
 Apply a Transform3d in this pose's frame.
Pose3d RelativeTo (const Pose3d &other) const
 Express this pose relative to another pose.
Pose3d RotateBy (const Rotation3d &rot) const
 Rotate this pose around the global origin.
Pose3d RotateAround (const Translation3d &point, const Rotation3d &rot) const
 Rotate this pose around an arbitrary point in 3D space.
Pose3d Nearest (std::initializer_list< Pose3d > poses) const
 Find the nearest pose from a collection.
Pose3d operator+ (const Transform3d &transform) const
 operator+ applies a Transform3d.
Transform3d operator- (const Pose3d &other) const
 operator- returns the Transform3d mapping other -> this.
Pose3d operator* (double scalar) const
 Scalar multiplication of both translation and rotation.
Pose3d operator/ (double scalar) const
 Scalar division.
Twist3d Log () const
 Logarithm map: SE(3) -> se(3).
Public Member Functions inherited from valor::EigenUnit::NamedPhysicalMatrix< Pose3d, EigenUnit::PhysicalMatrix< HomogeneousVector3d, HomogeneousVector3d > >
 NamedPhysicalMatrix (const EigenUnit::PhysicalMatrix< HomogeneousVector3d, HomogeneousVector3d > &base)
Pose3d Inverse () const
auto Block () const

Static Public Member Functions

static Pose3d Exp (Twist3d twist)
 Exponential map: se(3) -> SE(3).

Detailed Description

Represents a 3D pose as a 4x4 homogeneous transformation matrix.

Constructor & Destructor Documentation

◆ Pose3d() [1/5]

valor::geometry::Pose3d::Pose3d ( Translation3d trans,
Rotation3d rot )
inline

Construct a Pose3d from a translation and rotation.

Creates a matrix of the form: [ R R R T ] [ R R R T ] [ R R R T ] [ 0 0 0 1 ]

◆ Pose3d() [2/5]

valor::geometry::Pose3d::Pose3d ( const Pose2d & pose)
inlineexplicit

Construct a Pose3d from a Pose2d in the X-Y plane.

Parameters
poseThe 2D pose.

◆ Pose3d() [3/5]

valor::geometry::Pose3d::Pose3d ( frc::Translation3d frcTrans,
frc::Rotation3d frcRot )
inlineexplicit

Construct a Pose3d from an frc::Translation3d and frc::Rotation3d.

Parameters
frcTransThe frc translation component.
frcRotThe frc rotation component.

◆ Pose3d() [4/5]

valor::geometry::Pose3d::Pose3d ( frc::Pose3d frcPose)
inlineexplicit

Construct a Pose3d from an frc::Pose3d.

Parameters
frcPoseThe frc pose to convert.

◆ Pose3d() [5/5]

valor::geometry::Pose3d::Pose3d ( frc::Pose2d frcPose)
inlineexplicit

Construct a Pose3d from an frc::Pose2d, lifting into 3D. Z is set to zero and pitch and roll are set to zero.

Parameters
frcPoseThe frc 2D pose to lift into 3D.

Member Function Documentation

◆ Nearest()

Pose3d valor::geometry::Pose3d::Nearest ( std::initializer_list< Pose3d > poses) const
inline

Find the nearest pose from a collection.

Parameters
posesCollection of candidate poses.
Returns
The nearest pose by translation distance.

◆ RelativeTo()

Pose3d valor::geometry::Pose3d::RelativeTo ( const Pose3d & other) const
inline

Express this pose relative to another pose.

Parameters
otherThe reference pose.
Returns
This pose in the other's frame.

◆ RotateAround()

Pose3d valor::geometry::Pose3d::RotateAround ( const Translation3d & point,
const Rotation3d & rot ) const
inline

Rotate this pose around an arbitrary point in 3D space.

Parameters
pointThe pivot point.
rotThe rotation to apply.
Returns
The rotated pose.

◆ RotateBy()

Pose3d valor::geometry::Pose3d::RotateBy ( const Rotation3d & rot) const
inline

Rotate this pose around the global origin.

Parameters
rotThe rotation to apply globally.
Returns
The rotated pose.

◆ ToPose2d()

Pose2d valor::geometry::Pose3d::ToPose2d ( ) const
inline

Project this pose onto the X-Y plane.

Returns
The 2D pose.

◆ TransformBy()

Pose3d valor::geometry::Pose3d::TransformBy ( const Transform3d & transform) const
inline

Apply a Transform3d in this pose's frame.

Parameters
transformThe transform to apply.
Returns
The new pose.

The documentation for this class was generated from the following file:
  • src/main/include/valkyrie/util/geometry/Pose.h