Online adaptive teleoperation via motion primitives for mobile robots