-In this paper, we propose the formation control algorithm using the leader-following robots in given space. The proposed method is as follows: First, we plan a path of the leader robot for the obstacle avoidance. After that, we propose the formation control algorithm of the following robots using the position and the orientation angle of the leader robot. Also, we propose method for adjusting the formation of the swarm robots when the following robots detect an obstacles. Finally, we show the effectiveness and feasibility of the proposed method though some simulations.