![]() |
WPILibC++ 2027.0.0-alpha-3
|
Represents a 3D pose containing translational and rotational elements. More...
#include <frc/geometry/Pose3d.h>
Public Member Functions | |
| constexpr | Pose3d ()=default |
| Constructs a pose at the origin facing toward the positive X axis. | |
| constexpr | Pose3d (Translation3d translation, Rotation3d rotation) |
| Constructs a pose with the specified translation and rotation. | |
| constexpr | Pose3d (units::meter_t x, units::meter_t y, units::meter_t z, Rotation3d rotation) |
| Constructs a pose with x, y, and z translations instead of a separate Translation3d. | |
| constexpr | Pose3d (const Eigen::Matrix4d &matrix) |
| Constructs a pose with the specified affine transformation matrix. | |
| constexpr | Pose3d (const Pose2d &pose) |
| Constructs a 3D pose from a 2D pose in the X-Y plane. | |
| constexpr Pose3d | operator+ (const Transform3d &other) const |
| Transforms the pose by the given transformation and returns the new transformed pose. | |
| constexpr Transform3d | operator- (const Pose3d &other) const |
| Returns the Transform3d that maps the one pose to another. | |
| constexpr bool | operator== (const Pose3d &) const =default |
| Checks equality between this Pose3d and another object. | |
| constexpr const Translation3d & | Translation () const |
| Returns the underlying translation. | |
| constexpr units::meter_t | X () const |
| Returns the X component of the pose's translation. | |
| constexpr units::meter_t | Y () const |
| Returns the Y component of the pose's translation. | |
| constexpr units::meter_t | Z () const |
| Returns the Z component of the pose's translation. | |
| constexpr const Rotation3d & | Rotation () const |
| Returns the underlying rotation. | |
| constexpr Pose3d | operator* (double scalar) const |
| Multiplies the current pose by a scalar. | |
| constexpr Pose3d | operator/ (double scalar) const |
| Divides the current pose by a scalar. | |
| constexpr Pose3d | RotateBy (const Rotation3d &other) const |
| Rotates the pose around the origin and returns the new pose. | |
| constexpr Pose3d | TransformBy (const Transform3d &other) const |
| Transforms the pose by the given transformation and returns the new transformed pose. | |
| constexpr Pose3d | RelativeTo (const Pose3d &other) const |
| Returns the current pose relative to the given pose. | |
| constexpr Pose3d | RotateAround (const Translation3d &point, const Rotation3d &rot) const |
| Rotates the current pose around a point in 3D space. | |
| constexpr Eigen::Matrix4d | ToMatrix () const |
| Returns an affine transformation matrix representation of this pose. | |
| constexpr Pose2d | ToPose2d () const |
| Returns a Pose2d representing this Pose3d projected into the X-Y plane. | |
| constexpr Pose3d | Nearest (std::span< const Pose3d > poses) const |
| Returns the nearest Pose3d from a collection of poses. | |
| constexpr Pose3d | Nearest (std::initializer_list< Pose3d > poses) const |
| Returns the nearest Pose3d from a collection of poses. | |
Represents a 3D pose containing translational and rotational elements.
|
constexprdefault |
Constructs a pose at the origin facing toward the positive X axis.
|
inlineconstexpr |
Constructs a pose with the specified translation and rotation.
| translation | The translational component of the pose. |
| rotation | The rotational component of the pose. |
|
inlineconstexpr |
Constructs a pose with x, y, and z translations instead of a separate Translation3d.
| x | The x component of the translational component of the pose. |
| y | The y component of the translational component of the pose. |
| z | The z component of the translational component of the pose. |
| rotation | The rotational component of the pose. |
|
inlineexplicitconstexpr |
Constructs a pose with the specified affine transformation matrix.
| matrix | The affine transformation matrix. |
|
inlineexplicitconstexpr |
Constructs a 3D pose from a 2D pose in the X-Y plane.
| pose | The 2D pose. |
|
inlineconstexpr |
|
inlineconstexpr |
Transforms the pose by the given transformation and returns the new transformed pose.
The transform is applied relative to the pose's frame. Note that this differs from Pose3d::RotateBy(const Rotation3d&), which is applied relative to the global frame and around the origin.
| other | The transform to transform the pose by. |
|
constexpr |
Returns the Transform3d that maps the one pose to another.
| other | The initial pose of the transformation. |
|
inlineconstexpr |
|
constexprdefault |
Checks equality between this Pose3d and another object.
Returns the current pose relative to the given pose.
This function can often be used for trajectory tracking or pose stabilization algorithms to get the error between the reference and the current pose.
| other | The pose that is the origin of the new coordinate frame that the current pose will be converted into. |
|
inlineconstexpr |
Rotates the current pose around a point in 3D space.
| point | The point in 3D space to rotate around. |
| rot | The rotation to rotate the pose by. |
|
inlineconstexpr |
Rotates the pose around the origin and returns the new pose.
| other | The rotation to transform the pose by, which is applied extrinsically (from the global frame). |
|
inlineconstexpr |
Returns the underlying rotation.
|
inlineconstexpr |
Returns an affine transformation matrix representation of this pose.
|
inlineconstexpr |
|
constexpr |
Transforms the pose by the given transformation and returns the new transformed pose.
The transform is applied relative to the pose's frame. Note that this differs from Pose3d::RotateBy(const Rotation3d&), which is applied relative to the global frame and around the origin.
| other | The transform to transform the pose by. |
|
inlineconstexpr |
Returns the underlying translation.
|
inlineconstexpr |
Returns the X component of the pose's translation.
|
inlineconstexpr |
Returns the Y component of the pose's translation.
|
inlineconstexpr |
Returns the Z component of the pose's translation.