In this paper, we present a sliding mode controller to coordinate a team of nonholonomic robots in a leader-following configuration. We consider a two-vehicle team that is required to follow a prescribed trajectory while maintaining a desired formation. We show that under certain reasonable assumptions the formation is stable; that is, robots are able to maintain a desired distance and relative bearing. The stability properties of the closed-loop system are studied using Lyapunov theory. Numerical simulations as well as experimental results verify the validity of our approach.