In order to complete a service task more efficiently, robot needs to create a map quickly and recognize objects during this process. In this paper, a novel mapping method is proposed to address this problem. Firstly, Admissible Space Tree is generated to acquire possible node. Then, immune algorithm is applied for its advantages such as diversity, dynamic, parallel management and self-adaptation. And antibody affinity is constructed to select optimal path. Meanwhile, robot recognizes key objects on its way to get the semantic information. To achieve this purpose, normed gradients feature has been extracted to describe the object windows. It is based on just a few training images and also has the ability to learn incrementally. Subsequently, three support vector machines are respectively used for objectness estimation and object types detection. Experimental results demonstrate that the presented method can build a semantic map more efficient, which verifies the feasibility of proposed algorithm.