Humanoid Locomotion Planning for Visually Guided Tasks