1. A computer-implemented method for determining an instruction to send to a legged robot, the method comprising: calculating a rate of change of the robot's centroidal angular momentum ({dot over (H)} G ) in accordance with the equation: 
 {dot over (H)} G =GPÃ—R, wherein G represents a location of a center of mass of the robot, R represents a resultant ground reaction force acting upon the robot, P represents a location of a center of pressure of the resultant ground reaction force, GP represents a vector from G to P, and x represents a vector product operation; determining whether the rate of change of the robot's centroidal angular momentum ({dot over (H)} G ) exceeds a threshold value, wherein the threshold value is based on one or more factors of a group containing a friction between the robot and a support surface, a torque limit of an actuator of the robot, a design parameter of the robot, and an inertial property of the robot; and responsive to determining that the rate of change of the robot's centroidal angular momentum ({dot over (H)} G ) exceeds the threshold value, using a processor to determine an instruction to send to the robot, wherein the determined instruction causes the robot to change a resultant ground reaction force acting upon the robot.