A homogeneous matrix approach to 3D kinematics and dynamics .2. Applications to chains of rigid bodies and serial manipulators