Nonlinear filters for the generation of smooth trajectories