With the development of the automation industry in recent years, simultaneous positioning and mapping (SLAM) has been used in many fields such as mobile robots. Although visual SLAM has no detection distance limit, it would be easily affected by the environment, which causes inaccurate visual feature matching and cumulative error in map construction. The visual SLAM is studied which is about framework and algorithm in this paper. Aiming at the problem of insufficient front-end natural feature extraction accuracy, a method combined with artificial feature extraction is proposed. The Gauss-Seidel relaxation method is fused with Mobile Netv3-KPCA to solve the problem about low efficiency of traditional back-end optimization algorithms. The contradiction between closed-loop detection accuracy and real-time performance is discussed. An ideological framework combined with neural network is proposed for it. Traditional visual SLAM has limitations in the construction of high dynamic scenes. To address the problem, the geometric constraint method and progressive consistent sampling are used to filter out dynamic features. Dense point cloud construction thread is added to achieve the optimization of the ORB-SLAM2 framework. After analyzing the application of SLAM and path planning in dynamic environment, an experimental platform for robot indoor travel and corridor obstacle avoidance are constructed. The optimization framework based on ORB-SLAM2 and path planning method based on the A* algorithm are both studied in the end.