Motion Planning and Control for the Locomotion of Humanoid Robot