Development of a humanoid robot having 2-DOF waist and 2-DOF trunk