Class Pose¶
Defined in File pose.h
Class Documentation¶
-
class Pose¶
A rigid-body pose represented by translation and rotation.
Public Functions
-
Pose()¶
Constructs an identity pose with zero translation.
-
explicit Pose(const Matrix4dR &matrix)¶
Constructs a pose from a 4x4 homogeneous transformation matrix.
- Parameters:
matrix[in] Matrix4dR with rotation in the upper-left 3x3 block and translation in the upper-right 3x1 block.
-
Pose(Eigen::Vector3d position, Eigen::Quaterniond rotation)¶
Constructs a pose from translation and rotation.
- Parameters:
position[in] Translation vector (x, y, z).
rotation[in] Orientation as a unit quaternion.
-
const Eigen::Vector3d &position() const¶
Returns the translation component.
- Returns:
position vector
-
void set_position(const Eigen::Vector3d &position)¶
Sets the translation component.
- Parameters:
position[in] Translation vector (x, y, z).
-
const Eigen::Quaterniond &rotation() const¶
Returns the orientation as a unit quaternion.
- Returns:
rotation quaternion
-
void set_rotation(const Eigen::Quaterniond &rotation)¶
Sets the orientation from a unit quaternion.
- Parameters:
rotation[in] Orientation quaternion (normalized on assignment).
-
Matrix4dR to_matrix() const¶
Converts this pose to a 4x4 homogeneous transformation matrix.
- Returns:
Matrix4dR with rotation in the upper-left 3x3 block and translation in the upper-right 3x1 block.
-
Eigen::Vector3d euler_angles() const¶
Returns fixed-axis Euler angles (roll, pitch, yaw) in radians.
- Returns:
Eigen::Vector3d with roll (x), pitch (y), and yaw (z).
-
void set_rotation(const Matrix3dR &rotation_matrix)¶
Sets rotation from a 3x3 rotation matrix.
- Parameters:
rotation_matrix[in] 3x3 rotation matrix.
-
void set_rotation(const Eigen::Vector3d &euler_angles)¶
Sets rotation from fixed-axis Euler angles (roll, pitch, yaw).
- Parameters:
euler_angles[in] Vector with roll (x), pitch (y), and yaw (z) in radians.
-
Pose inverse() const¶
Returns the inverse of this pose.
- Returns:
Pose whose homogeneous matrix is the inverse of this pose’s matrix.
-
Pose operator*(const Pose &other) const¶
Composes two poses.
Returns the pose whose homogeneous matrix is the product of this pose’s matrix and
other‘s matrix (applyotherfirst, then this pose).- Parameters:
other[in] The pose to compose with.
- Returns:
The composed pose.
-
bool operator==(const Pose &other) const¶
Compares two poses for equality.
Poses are equal when their homogeneous transformation matrices match within machine precision (quaternion sign is ignored).
-
Eigen::Vector3d operator*(const Eigen::Vector3d &point) const¶
Transforms a 3D point by this pose.
- Parameters:
point[in] Point in the pose’s source frame.
- Returns:
Transformed point in the target frame.
-
Pose()¶