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)
| 59 | |
| 60 | |
| 61 | def 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 | |
| 77 | def pose_to_transform(pos: np.ndarray, quat_wxyz: np.ndarray) -> np.ndarray: |
nothing calls this directly
no outgoing calls
no test coverage detected