In recent years,with the development of computer science and technology,mobile robots are gradually applied to more production and life.Among them,the ability of mobile robots to locate and navigate in unknown scenes mainly depends on SLAM(Simultaneous Location and Mapping).Compared with SLAM algorithm of lidar,inertial navigation and other sensors,visual SLAM not only provides low hardware cost,but also can obtain rich scene information.For the convenience of calculation,the current visual SLAM often assumes the environment as a static scene.However,in the actual environment,there are often dynamic objects causing interference,which makes the SLAM system positioning and mapping in the dynamic environment with large errors.In order to solve this problem,based on ORB-SLAM2 algorithm framework,this paper studies a visual SLAM algorithm for mobile robot in dynamic scene.The specific research contents are as follows:Firstly,for depth camera,a front-end visual odometer based on feature point method is established,which lays the theoretical foundation of this paper.Then,a visual mileage algorithm based on dynamic object segmentation is proposed.In view of the problem that the instance semantic segmentation extracts the mask of each instance in the scene,but does not have the motion information,and the dynamic points traced by pyramid optical flow method are sparse,the two are combined to judge the moving objects in the environment.If a certain dynamic point falls into the instance mask,it is considered as a dynamic object.If all the feature points in the mask are deleted,the remaining points will be left.The static feature points are used to estimate the pose of the camera,so as to reduce the influence of moving objects.At the same time,the selected instance partition network has better real-time performance,which ensures that slam system can run in real time.Then,the nonlinear back-end optimization module is designed to eliminate the cumulative error caused by the front-end visual odometer.The key frames selected by the system are detected by loop detection and local BA optimization.The global optimization mode of the system is posture map optimization,so as to improve the positioning accuracy of the robot.In view of the situation that traditional SLAM Algorithm in dynamic environment will contain moving ghost,this paper constructs the static background after removing moving objects from the front-end,uses the octree map update property to filter out the residual moving objects,so as to construct a reusable map.Finally,the experimental platform of visual SLAM Algorithm in dynamic environment is built.The dynamic sequence of TUM data set is selected and compared with ORB-SLAM2 algorithm for pose estimation.The results show that the proposed algorithm can effectively reduce the influence of dynamic objects and improve the positioning accuracy of camera.Moreover,the dense map constructed by this algorithm basically does not contain moving objects,which achieves map reuse objective.At the same time,the effectiveness and robustness of the algorithm are verified by mobile robot experiments in real environment. |