Software control of single-step locomotion process is achieved by transitioning between functions in the locomotion software algorithm. The transitions are orchestrated by a finite-state machine that specifies the conditions for transition and the states to transition and the states to transition to.