Skip to main content

Pose

Inherits from: object A class to represent the pose (position and orientation) of the robot. Attributes: position (Position): The position component of the pose. orientation (Orientation): The orientation component of the pose.

init

Pose.__init__(position: Position, orientation: Orientation) -> None
Initialize a Pose with position and orientation.
Arguments
position (Position)
Position
required
The position component of the pose
orientation (Orientation)
Orientation
required
The orientation component of the pose
Returns
returns
None

init

Pose.__init__(homogeneous_matrix: np.ndarray) -> None
Initialize a Pose with a homogeneous matrix.
Arguments
homogeneous_matrix (np.ndarray)
np.ndarray
required
4x4 homogeneous transformation matrix
Returns
returns
None

init

Pose.__init__(pose_array: Union[list, np.ndarray]) -> None
Initialize a Pose with a 7-element array [x, y, z, qx, qy, qz, qw].
Arguments
pose_array (Union[list, np.ndarray])
Union[list, np.ndarray]
required
7-element array containing position and quaternion
Returns
returns
None

init

Pose.__init__(*args, **kwargs)
No docstring provided.
Arguments
args
No description provided.
kwargs
No description provided.

to_matrix

Pose.to_matrix() -> np.ndarray
Convert Pose to a 4x4 homogeneous transformation matrix.
Returns
np.ndarray
np.ndarray
4x4 homogeneous transformation matrix

to_dict

Pose.to_dict() -> dict
Serialize to dictionary for JSON transfer.
Returns
dict
dict
Dictionary representation of the pose

from_dict

Pose.from_dict(data: dict) -> 'Pose'
Deserialize from dictionary.
Arguments
data (dict)
dict
required
Dictionary containing pose data
Returns
Pose
'Pose'
Reconstructed pose object