The traditional laser SLAM (Simultaneous Localization and Mapping) algorithm uses the global relative poses and local ones to form residual blocks. Its constructed map is not smooth enough and the constraint construction is too simplex under some special scenarios. Thus, this paper proposes an odometer constraint fusion method called FOSLAM (Fusion Odometer SLAM) to construct residual blocks between constrains and solve the nonlinear least squares by Ceres. The effectiveness and accuracy of this method have been verified through comparative experiments. Experimental results showed that without increasing the time and space complexity, by involving the odometer constraint into the SLAM optimization process, the convergence of scan matching scores can be improved and the constructed grid map edges are smoother and the jagged phenomenon can be reduced. Under sophisticated scene, FOSLAM is able to acquire more accurate maps and laser odometer trajectory than Cartographer method. Therefore, it is suitable to be used on indoor robot for cleaning and inspection and can be further deployed on autonomous unmanned vehicles involving spatial visualization and neuro-heuristic guidance.