We address the problem of robustly tracking a desired workspace trajectory with a humanoid robot. The proposed solution is based on the suitable definition of a controlled output, which represents an averaged motion of the torso after cancellation of the sway oscillation. In particular, two different techniques are presented for extracting the averaged motion. For control design purposes, a unicycle-like model is associated to the evolution of this output. The feedback loop is then closed using a vision-based odometric localization method to estimate the torso motion. The proposed approach is validated through comparative experiments on the humanoid robot NAO.