Dynamics of Mechanical Systems and the Generalized Free-Body Diagram—Part I: General Formulation