Controlling Contact Transitions for Dynamic Robots