Design and control of a humanoid robot