Simultaneous localization and mapping (SLAM) is an active area of research. SLAM algorithms should allow the robot to start its movement from a random position in an unknown environment and to build the map of the area while knowing its own position relative to the map. Thus, at the end of the mapping task robot should be able to return where it has started. Especially in real time applications, using limited sensor data, there are still many problems to be conquered. In this study a probabilistic occupancy grid approach is proposed to build the map of an unknown environment. The method tested both in a simulation environment and on a real robot. Although there are some improvements to be made, the initial results are promising.