Transform
Represents a 3D pose transformation between two coordinate frames.
Properties:
Property | Type | Description |
|---|---|---|
|
| Transform metadata header |
Read-only properties:
Property | Type | Description |
|---|---|---|
|
| Translation |
|
| Quaternion |
|
| Second-precision timestamp, equivalent to |
|
| Source frame, equivalent to |
|
| Target frame, equivalent to constructor parameter |
|
| Euler angles |
Transform
Signature:
Transform(
translation: np.ndarray,
rotation: np.ndarray,
child_frame_id: str,
header: Header | None = None,
)
Description:
Construct a Transform instance.
Parameters:
Parameter | Type | Required | Description |
|---|---|---|---|
|
| Yes | Translation |
|
| Yes | Quaternion |
|
| Yes | Target coordinate frame |
|
| No | Transform metadata header; uses default |
Returns:
Transform instance.
Raises:
None.
inverse
Signature:
Transform.inverse() -> Transform
Description:
Returns the inverse transform; source and target coordinate frames are swapped.
Parameters:
No parameters.
Returns:
Transform, a new inverse transform object.
Raises:
None.
to_matrix
Signature:
Transform.to_matrix() -> np.ndarray
Description:
Returns a 4x4 homogeneous transformation matrix.
Parameters:
No parameters.
Returns:
np.ndarray, shape (4, 4).
Raises:
None.
to_numpy
Signature:
Transform.to_numpy() -> dict[str, np.ndarray]
Description:
Returns a dict containing translation / rotation / rpy / matrix.
Parameters:
No parameters.
Returns:
dict[str, np.ndarray].
Raises:
None.