In this thesis, after a survey on Simultaneously Localization and Mapping (SLAM) algorithm and probabilistic approaches to solve SLAM algorithm, the modification of two-dimensional EKF SLAM for a mobile robot that moves ona non-flat environment using IMU data, was adopted as the topic of the research. A lot of works have been done on 2D mapping of environments for moving on flat surfaces, while creation of 2D maps for motion on a non-flat environment is still elaborated. Augmenting the IMU data in the EKF SLAM lets 2D mapping created from motion on a flat surface to be modified for motion on a non-flat surface. It also lets the surface roughness to be included in the robot path on the surface. After a comprehensive survey on the EKF SLAM and its constructing blocks, EKF SLAM with line features was selected.In the first step the split and merge method as well as line regression method were slightly modified to achieve a more accurate feature extraction algorithm. The modifications basically focused on the basic algorithm and elimination of outliers such as noises. Elimination of outliers was done by a simple algorithm which is based on the calculation of standard variation for a set of data and comparison of each data with this standard variation. This modified and extended algorithm was then implemented and tested using a developed Matlab codefor a set of available data on the net [1] and several sets ofdata that collected by our rescue robot called Sun of Saba equipped with a 2D laser range finder, moving motor encoders, and inertial measurement unit (IMU). Implementations and results showed the efficiency and convergence of the algorithm. In one of the experiments while the robot moved on a spiral path in the corridor, due to the weakness of the track friction, the robot experienced slippery motion several times. However the algorithm, besides these slippery motions, succeeded to localize the robot path and detecting the corridor walls very good. In the next step, algorithm was extended to for motion on a non-flat surface which simulation results showed that regular EKF SLAM fails to map the environment. For this purpose, pitch angle of the robot measured byIMU and uncertainty of pitch angle were added to the state vector and the state covariance, respectively, for tracking the surface roughness. Consequently, the whole equations were derived again and the feature extraction algorithm was modified for the new set of Odometery and observation data. Then the extended algorithm was used for different sets of data collected by Sun of Saba while inclining and declining on a ramp in a structural environment. The results showed the capability and the efficiency of the extended algorithm on mapping the environment from data collected by a mobile robot moving on non-flat surfaces. Keywords: EKF SLAM, Laser range finder, Feature extraction, Inertial measurement unit. [1] www.mrpt.org