This paper describes development of a navigation system for moving through narrow spaces. Getting a path through narrow spaces is a difficult task for wheeled robots with non-holonomic constraints because it is necessary for the path planning process to carefully detect collision considering contour of robot and realize the smoothness of the path. In addition, in order to generate accurate paths, the path planning process needs an accurate map which shows the obstacles even on narrow slopes. Therefore we proposed the methods for generating obstacle maps with the plane link structure approach and optimizing path using nonlinear optimization approach. By using our methods, collision free smooth path through narrow spaces with slope has been generated in real time and our robot is able to move narrow spaces.