MCPcopy Create free account
hub / github.com/BeingBeyond/BeTTER / apply_relative_transform

Function apply_relative_transform

src/core/transforms.py:61–74  ·  view source on GitHub ↗

Apply a relative transform to a reference frame. T_src_new = T_ref_new * T_rel Args: ref_mat: New reference frame transform in world coordinates. rel_mat: Relative transform matrix. Returns: New world transform matrix.

(ref_mat: np.ndarray, rel_mat: np.ndarray)

Source from the content-addressed store, hash-verified

59
60
61def apply_relative_transform(ref_mat: np.ndarray, rel_mat: np.ndarray) -> np.ndarray:
62 """
63 Apply a relative transform to a reference frame.
64
65 T_src_new = T_ref_new * T_rel
66
67 Args:
68 ref_mat: New reference frame transform in world coordinates.
69 rel_mat: Relative transform matrix.
70
71 Returns:
72 New world transform matrix.
73 """
74 return ref_mat @ rel_mat
75
76
77def pose_to_transform(pos: np.ndarray, quat_wxyz: np.ndarray) -> np.ndarray:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected