1. A method to build a map for a moving robot, the method comprising: acquiring 3D distance information of an object present in a path along which the moving robot moves; accumulating the acquired 3D distance information to construct maps of a specific size level and storing the maps in a database; and hierarchically matching, by a computer, the maps stored in the database to build a 3D map for a set space.