In this study, the objective is to build a wheeled mobile robot which can move independently avoiding obstacles. To move autonomously, this robot is enabled to detect obstacles' shapes and conduct self-localization. Also, this robot can move by tracking trajectories designed by the robot itself, based on the information about the obstacles' shapes and the robot's position and attitude angle. The optimal trajectories which lead the robot to its destination are designed by using a unique optimization method. As convergent calculation is performed by setting the variables within a certain range in this proposed optimization method, the optimal solutions can be obtained approximately, even in cases where there is a difference between the number of input and output variables, and when the nonlinearity is strong with restraint conditions. In this thesis, the effectiveness of the optimal track designing method used is proven and the method deemed as appropriate.