This article presents a system for segmentation the data of a laser scanner on board a mobile robot. Three algorithms were tested in three different environments. They were compared in terms of their robust segmentation for indoor and outdoor environments, good representation of the environment and their handling for the map building. For environment modelling a polygonal representation was chosen. Furthermore, it should have good real-time capability to be able to integrate the information of the laser-scanner into the navigation algorithms of the mobile robot.