Dynamic modeling of serial and parallel mechanisms/robotic systems. Part I. Methodology