APP下载

基于视觉的机器人自主定位与障碍物检测方法

2019-08-27丁斗建赵晓林王长根高关根寇磊

计算机应用 2019年6期

丁斗建 赵晓林 王长根 高关根 寇磊

摘 要:针对稀疏型同时定位与地图构建(SLAM)算法环境信息丢失导致无法检测障碍物问题,提出一种基于视觉的机器人自主定位与障碍物检测方法。首先,利用双目相机得到观测场景的视差图。然后,在机器人操作系统(ROS)架构下,同时运行定位与建图和障碍物检测两个节点。定位与建图节点基于ORB-SLAM2完成位姿估计与环境建图。障碍物检测节点引入深度阈值,将视差图二值化;运用轮廓提取算法得到障碍物轮廓信息并计算障碍物凸包面积;再引入面积阈值,剔除误检测区域,从而实时准确地解算出障碍物坐标。最后,将检测到的障碍物信息插入到环境的稀疏特征地图当中。实验结果表明,该方法能够在实现机器人自主定位的同时,快速检测出环境中的障碍物,检测精度能够保证机器人顺利避障。

关键词:视觉定位;障碍物检测;视觉同时定位与地图构建;机器人操作系统;立体视觉;机器人

中图分类号: TP242.6智能机器人

文献标志码:A

Abstract: Aiming at the obstacle detection problem caused by the loss of environmental information in sparse Simultaneous Localization And Mapping (SLAM) algorithm, an autonomous location and obstacle detection method of robot based on vision was proposed. Firstly, the parallax map of the observed scene was obtained by binocular camera. Secondly, under the framework of Robot Operating System (ROS), localization and mapping node and obstacle detection node were operated simultaneously. The localization and mapping node completed pose estimation and map building based on ORB-SLAM2. In the obstacle detection node, a depth threshold was introduced to binarize the parallax graph and the contour extraction algorithm was used to obtain the contour information of the obstacle and calculate the convex hull area of the obstacle, then an area threshold was introduced to eliminate the false detection areas, so as to accurately obtain the coordinates of obstacles in real time. Finally, the detected obstacle information was inserted into the sparse feature map of the environment. Experiment results show that this method can quickly detect obstacles in the environment while realizing autonomous localization of the robot, and the detection accuracy can ensure the robot to avoid obstacles smoothly.

Key words: visual localization; obstacle detection; Visual Simultaneous Localization And Mapping (VSLAM); robot operating system; stereo vision; robot

0 引言

隨着机器人应用领域的不断拓展,对其自主性的要求也在不断提升[1]。要实现机器人自主移动,自主定位技术和自主避障技术是最为关键的两个方面。在机器人自主定位与自主避障研究中,视觉传感器由于具有功耗低、价格便宜、可以获得更加丰富的环境信息等优点[2],得到了广泛应用[3-4]。

基于视觉的机器人自主定位研究已有近二十年的历史。文献[5]中提出视觉里程计以后,基于视觉里程计的视觉同时定位与地图构建(Visual Simultaneous Localization And Mapping, VSLAM)算法受到广泛的关注。……

登录APP查看全文