In this project, we investigate the problem of computing movements for robots with arms and legs in intermittent contact with their environment that are physically correct. Our approach uses trajectory optimization and optimal control techniques. In particular, we study how the physics of mechanical systems impose a structure to the underlying optimization problem. This can be leveraged to find computationally efficient algorithms that optimize for the centroidal-momentum dynamics of the robot, contact timing, locations and forces as well as whole-body motions. Our ultimate goal is to demonstrate such techniques in real-time on complex multi-contact tasks.