Gravar-mail: A New Foot Trajectory Planning Method for Legged Robots and Its Application in Hexapod Robots