Path planning for humanoid robots by sliding static stability constraints