This paper presents a methodology for generating locally optimal control policies for mechanical systems that undergo collisions at point contacts. Principles of
nonsmooth mechanics for rigid bodies are used in both continuous and discrete time, and provide impact models for a variety of collision behaviors. The discrete
Euler-Lagrange (DEL) equations that follow from the discrete time analyses yield variational integration schemes for the dierent impact models. These DEL
equations play a pivotal role in the method of Discrete Mechanics and Optimal Control (DMOC), which generates locally optimal control policies as the solution
to equality constrained nonlinear optimization problems. The DMOC method is demonstrated on a 4-link planar walking robot model, generating locally optimal periodic walking gaits