Dynamics and Control of Hybrid Mechanical Systems