Learning Perceptual Coupling for Motor Primitives