pyrobosim.utils.pose.Pose
- class pyrobosim.utils.pose.Pose(x: float = 0.0, y: float = 0.0, z: float = 0.0, roll: float = 0.0, pitch: float = 0.0, yaw: float = 0.0, q: list[float] | None = None, angle_units: str = 'radians')
Represents a 3D pose.
Methods
__init__([x, y, z, roll, pitch, yaw, q, ...])Creates a new Pose object.
construct(data)Constructs a pose object from any of the allowable input types.
from_dict(pose_dict)Creates a pose from a dictionary.
from_list(plist)Creates a pose from a list.
from_transform(tform)Creates a pose from a transformation matrix.
get_angular_distance(other)Gets the angular distance between two poses, wrapped in the range [-pi, pi].
get_linear_distance(other[, ignore_z])Gets the straight-line distance between two poses.
Gets a rotation matrix from the pose representation.
Gets a homogeneous transformation matrix from the pose representation.
Gets the pose x y and z of the pose as an array.
Gets a translation matrix from the pose representation.
get_yaw()Gets the yaw angle, in radians.
is_approx(other[, rel_tol, abs_tol])Check if two poses are approximately equal with a tolerance.
set_euler_angles([roll, pitch, yaw])Sets the orientation component as Euler angles.
Sets the orientation component as a quaternion.
to_dict()Converts the pose instance to a dictionary compatible with YAML.