Abstract-In this paper, we formulate a novel hierarchical controller for walking of torque controlled humanoid robots. Our method uses an online whole body optimization approach which generates joint torques, given Cartesian accelerations of different points on the robot. Over such variable translation, we can plan our desired foot trajectories in Cartesian space between starting and ending positions of the foot on the ground. On top level, we use the simplified Linear Inverted Pendulum Model to predict the future motion of the robot. With LIPM, we derive a formulation where the whole system is described by the state of center of mass and footstep locations serve as discrete inputs to this linear system. We then use model predictive control to plan optimal future footsteps which resemble a reference plan, given desired sagittal and steering velocities determined by the high-end user. Using simulations on a child-size torque controlled humanoid robot, the method tolerates various disturbances such as external pushes, sensor noises, model errors and delayed communication in the control loop. It can perform robust walking over slopes and uneven terrains blindly and turn rapidly at the same time. Our generic dynamics model-based method does not depend on any off-line optimization, being suitable for typical torque controlled humanoid robots.