Modular Robot Control with Motor Primitives