Rigid3d: Tutorial
T_ac = T_ab @ T_bc Order matters. The rightmost transform is applied first to the point. 6. Inversion The inverse of a rigid transform ( T_ab ) is ( T_ba ). It rotates by ( R^T ) and translates by ( -R^T t ).
// Rotation: 90 deg around Z Quaterniond q = Quaterniond(Eigen::AngleAxisd(M_PI/2, Vector3d::UnitZ())); Vector3d t(1.0, 0.0, 0.0); SE3d T_ab(q, t); // Transformation from frame A to frame B rigid3d tutorial
T_ba = np.linalg.inv(T_ab) # For rigid transforms, this is more efficient: R_inv = T_ab[:3,:3].T t_inv = -R_inv @ T_ab[:3,3] C++: T_ac = T_ab @ T_bc Order matters
[ T_ac = T_ab \cdot T_bc ]
[ p_B = R_AB \cdot p_A + t_AB ]
# Rotation: 90 deg around Z r = R.from_euler('z', 90, degrees=True) t = np.array([1.0, 0.0, 0.0]) T = np.eye(4) T[:3,:3] = r.as_matrix() T[:3, 3] = t 4. Applying the Transformation Transform a 3D point ( p = (0, 1, 0) ) from frame A to frame B. Inversion The inverse of a rigid transform (
p_a = np.array([0, 1, 0]) p_b = T[:3,:3] @ p_a + T[:3,3] print(p_b) # [0., 0., 0.] If you have ( T_bc ) and ( T_ab ), the transform from ( a ) to ( c ) is: