The purpose of this book is to present computationally efficient algorithms for calculating the dynamics of robot mechanisms represented as systems of rigid bodies. The efficiency is achieved by the use of recursive formulations of the equations of motion, i.e. formulations in which the equations of motion are expressed implicitly in terms of recurrence relations between the quantities describing the system. The use of recursive formulations in dynamics is fairly new, 50 the principles of their operation and reasons for their efficiency are explained. Three main algorithms are described: the recursIve Newton-Euler formulation for inverse dynamics (the calculation of the forces given the accelerations), and the composite-rigid-body and articulated-body methods for forward dynamics (the calculation of the accelerations given the forces). These algorithms are initially described in terms of an un-branched, open- loop kinematic chain — a typical serial robot mechanism. This is done to keep the descriptions of the algorithms simple, and is in line with descriptions appearing in the literature. Once the basic algorithms have been introduced, the restrictions on the mechanism are lifted and the algorithms are extended to cope with kinematic trees and loops, and general constraints at the joints. The problem of simulating the effect of contact between a robot and its environment is also considered. Some consideration is given to the details and practical problems of implementing these algori?hms on a computer.