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

Function propagate_pose

src/core/transforms.py:125–140  ·  view source on GitHub ↗

Propagate one object's pose through another object's rigid motion. Returns: (new_pos2, new_quat2_wxyz)

(
    current_pos1: np.ndarray, current_quat1_wxyz: np.ndarray,
    prev_pos1: np.ndarray, prev_quat1_wxyz: np.ndarray,
    prev_pos2: np.ndarray, prev_quat2_wxyz: np.ndarray,
)

Source from the content-addressed store, hash-verified

123
124
125def propagate_pose(
126 current_pos1: np.ndarray, current_quat1_wxyz: np.ndarray,
127 prev_pos1: np.ndarray, prev_quat1_wxyz: np.ndarray,
128 prev_pos2: np.ndarray, prev_quat2_wxyz: np.ndarray,
129) -> Tuple[np.ndarray, np.ndarray]:
130 """
131 Propagate one object's pose through another object's rigid motion.
132
133 Returns:
134 (new_pos2, new_quat2_wxyz)
135 """
136 T_curr1 = pose_to_transform(current_pos1, current_quat1_wxyz)
137 T_prev1 = pose_to_transform(prev_pos1, prev_quat1_wxyz)
138 T_prev2 = pose_to_transform(prev_pos2, prev_quat2_wxyz)
139 T_new2 = T_prev2 @ np.linalg.inv(T_prev1) @ T_curr1
140 return transform_to_pose(T_new2)

Callers

nothing calls this directly

Calls 2

pose_to_transformFunction · 0.85
transform_to_poseFunction · 0.85

Tested by

no test coverage detected