Optimal Trajectory Generation for a Paraplegic Patient Rising from a Chair by means of FES