Adaptive plasticity in the control of locomotor trajectory