Learning an embedding space for transferable robot skills