mechanism for gait pattern generation