Motion representations for learning robots and human-robot interaction : polynomial splines and movement primitives