Curve Tracking Control for Legged Locomotion in Horizontal Plane