Jerk-continuous trajectories for cyclic tasks