Automatic differentiation of rigid body dynamics for optimal control and estimation | Synapse