Learning by demonstration for motion planning of upper-limb exoskeletons