11#include <eigen3/Eigen/Dense>
12#include <eigen3/Eigen/Geometry>
52 Pose(
const Eigen::Vector3d &position,
const Eigen::Quaterniond &orientation);
60 Pose(
const Eigen::Vector3d &position,
const Eigen::Matrix3d &rotation_matrix);
67 explicit Pose(
const Eigen::Affine3d &transformation);
75 Pose(
const Eigen::Vector3d &position,
const Rotation &orientation);
83 explicit Pose(
const Eigen::Matrix4d &homogeneousT);
127 friend std::ostream &
operator<<(std::ostream &os,
const Pose &pose);
171 [[nodiscard]]
double getX()
const;
178 [[nodiscard]]
double getY()
const;
185 [[nodiscard]]
double getZ()
const;
192 [[nodiscard]]
double getQx()
const;
199 [[nodiscard]]
double getQy()
const;
206 [[nodiscard]]
double getQz()
const;
213 [[nodiscard]]
double getQw()
const;
302 [[nodiscard]] Eigen::Vector3d
localToGlobal(
const Eigen::Vector3d &local_point)
const;
310 [[nodiscard]] Eigen::Vector3d
globalToLocal(
const Eigen::Vector3d &global_point)
const;
Class representing a pose in 3D space.
Eigen::Vector3d globalToLocal(const Eigen::Vector3d &global_point) const
Transforms a point from the global frame to the pose's local frame.
double getQw() const
Gets the W component of the quaternion.
double getQz() const
Gets the Z component of the quaternion.
double getY() const
Gets the Y coordinate of the position.
double getQy() const
Gets the Y component of the quaternion.
Eigen::Quaterniond orientation_
Orientation represented as quaternion.
double positionDistance(const Pose &other) const
Calculates the Euclidean distance between the positions of two poses.
void setOrientation(const Eigen::Quaterniond &orientation)
Sets the orientation via quaternion.
double getX() const
Gets the X coordinate of the position.
Pose transformPose(const Pose &transform) const
Transforms this pose from one coordinate frame to another.
Eigen::Vector3d getPosition() const
Gets the position.
void setAffineTransformation(const Eigen::Affine3d &transformation)
Sets the affine transformation.
Eigen::Vector3d position_
Position in 3D space.
Pose() noexcept
Default constructor.
void setRotationMatrix(const Eigen::Matrix3d &rotation_matrix)
Sets the rotation matrix.
Eigen::Affine3d getAffineTransformation() const
Gets the affine transformation.
Eigen::Vector3d localToGlobal(const Eigen::Vector3d &local_point) const
Transforms a point from the pose's local frame to the global frame.
Pose & operator=(const Pose &other)
Copy assignment operator.
void setPosition(const Eigen::Vector3d &position)
Sets the position.
static void validateHomogeneousMatrix(const Eigen::Matrix4d &homogeneousT)
Validates a homogeneous transformation matrix.
double getQx() const
Gets the X component of the quaternion.
void setHomogeneousT(const Eigen::Matrix4d &homogeneousT)
Sets the homogeneous transformation matrix.
friend std::ostream & operator<<(std::ostream &os, const Pose &pose)
Overloads the stream insertion operator.
Pose inverse() const
Calculates the inverse of the pose.
Eigen::Quaterniond getQuaternion() const
Gets the orientation quaternion.
double getZ() const
Gets the Z coordinate of the position.
double orientationDistance(const Pose &other) const
Calculates the angular distance between the orientations of two poses.
Pose operator*(const Pose &other) const
Composition of two poses.
Eigen::Matrix3d getRotationMatrix() const
Gets the rotation matrix.
Eigen::Matrix4d getHomogeneousT() const
Gets the homogeneous transformation matrix.
Class for representing and managing rotations in three-dimensional space.
Namespace for movement and manipulation of poses.
Class for representing and manipulating 3D rotations.