A direct method for trajectory optimization of rigid bodies through contact | Synapse