With respect to some fixed frame of reference, given the inertial tensors, positions, orientations, and angular and linear velocities of two rigid bodies, how do you combine them to make a single rigid body?
Positions (center of mass in global frame): $x_1$, $x_2$
Orientations (rotation from canonical orientation in global frame): $R_1$, $R_2$
Inertial tensors (in body's frame) $I_1$, $I_2$
Total masses (scalar): $m_1$, $m_2$
Linear velocities (global frame): $v_1$, $v_2$
Angular velocities around center of mass (global frame): $\omega_1$, $\omega_2$
The new position and mass are easy, of course:
$m_f = m_1 + m_2$
$x_f = \frac{x_1m_1 + x_2m_2}{m_f}$
The canonical orientation for the combined body isn't really defined; so we can just make it the identity matrix:
$R_f = \left| \begin{array}{ccc} 1 & 0 & 0\\ 0 & 1 & 0\\0 &0&1\end{array}\right|$
I can then combine the inertial tensors into the new local frame of reference:
$t_1 = x_f - x_1$ (translation of $I_1$)
$J_1 = \left| \begin{array}{ccc}
-(t_{1y}^2+t_{1z}^2)&t_{1x}t_{1y} &t_{1x}t_{1z} \\
t_{1x}t_{1y} &-(t_{1x}^2+t_{1z}^2)&t_{1y}t_{1z} \\
t_{1x}t_{1z} &t_{1y}t_{1z} &-(t_{1x}^2+t_{1y}^2)
\end{array} \right|$ (unscaled change)
And likewise for $J_2$
$I_f = (R_1I_1R_1^\intercal+ m_1J_1)+ (R_2I_2R_2^\intercal+m_2J_2)$
I think it's mostly right up to there. How do I find $\omega_f$ and $v_f$ so that all of the energy is accounted for?
Attempting to answer my own question:
Can I treat the two bodies as point masses and then combine their velocities according to conservation of momentum? It feels wrong.
$v_f = \frac{m_1v_1 + m_2v_2}{m_f}$
It feels even more wrong to find the joint angular momentum:
$L_f = I_1\omega_1+t_1\!\!\times\!\!(m_1v_1)+I_2\omega_2+t_2\!\!\times\!\!(m_2v_2) = I_f\omega_f$
$\omega_f = I_f^{-1}L_f$
Is that it?
