The invention provides a noise filtering method for obstacle avoidance of robot lidar. It includes the following steps: setting the distance threshold; reading all scanning points of lidar and their distances from the robot; taking three consecutive points as samples from one point of all scanning points in turn, and determining outliers according to the distance between the two points in the sample; if there are outliers, calculating the distance between the outliers and the connecting lines of the other two points. Compared with the distance threshold in step 1, if the distance threshold is greater than the distance threshold, the point is considered as a noise point, and the distance between the noise point and the robot is set to zero or infinite; if it is less than the distance threshold, it is not processed; if there is no outlier, the sampling will not be processed, and the next sampling will continue until all the scanning points have completed at least one comparison and return. To the initial point. The noise filtering method provided by the invention has high accuracy and good real-time performance, and is beneficial to promoting the production of artificial intelligence.
【技术实现步骤摘要】
机器人激光雷达避障的噪点滤波方法
涉本专利技术涉及激光雷达
,具体涉及一种机器人激光雷达避障的噪点滤波方法。
技术介绍
现有的应用于机器人的低成本激光雷达在扫描周遭环境时会出现跳动的噪点,所述噪点将导致机器人误认为所述噪点处有障碍物从而进行规避,导致行走路线偏离甚至影响到机器人的正常行走。现有技术中的滤波算法无论在实时性或正确性上皆不能满足机器人避障的要求。因为:一、这些滤波算法需要进行一定的采样,而机器人避障要求的障碍物信息必须实时,障碍物信息的滞后会导致避障出现问题。举个例子,比如激光雷达看到障碍物离机器人为1m,滤波所耗费时间为0.5s,0.5s后机器人实际离障碍物只有0.5m,但滤波的时刻为0.5s前,认为障碍物距离为1m,存在时间延时和空间误差。二、现有的滤波算法不考虑障碍物特征相关的信息,而误将跳动的点滤除。比如确实是有一个物体在机器人前跳动,那么经过现有滤波算法滤除后机器人会认为该障碍物不存在,从而导致与障碍物相撞。
技术实现思路
本专利技术的目的在于克服现有滤波技术在正确性及实时性上存在的问题,提供一种正确率高、实时性好的机器人激光雷达避障的噪点滤波方法。一种机器人激光雷达避障的噪点滤波方法,具体包括如下步骤:步骤S1、设定距离阈值;步骤S2、读取激光雷达的所有扫描点及其距离机器人的距离;步骤S3、从所述所有扫描点的某点开始依次取连续的三个点作为样本,根据该样本内三个点两两相互之间的距离确定有无离群点;若有离群点,则进入步骤S4;若无离群点,则本次取样不作处理,继续下一取样;步骤S4、计算所述离群点与另二个点连线之间的距离,并与步骤S1所 ...
【技术保护点】
1.一种机器人激光雷达避障的噪点滤波方法,其特征在于:具体包括如下步骤:步骤S1、设定距离阈值;步骤S2、读取激光雷达的所有扫描点及其距离机器人的距离;步骤S3、从所述所有扫描点的某点开始依次取连续的三个点作为样本,根据该样本内三个点两两相互之间的距离确定有无离群点;若有离群点,则进入步骤S4;若无离群点,则本次取样不作处理,继续下一取样;步骤S4、计算所述离群点与另二个点连线之间的距离,并与步骤S1所述距离阈值进行比较;若大于所述距离阈值,则认为该点为噪点,将所述噪点与机器人之间的距离设为零或无穷大;若小于所述距离阈值,则不作处理;步骤S5、循环步骤S3至步骤S4直至所述所有扫描点至少完成一次比对且回到初始点。
【技术特征摘要】
1.一种机器人激光雷达避障的噪点滤波方法,其特征在于:具体包括如下步骤:步骤S1、设定距离阈值;步骤S2、读取激光雷达的所有扫描点及其距离机器人的距离;步骤S3、从所述所有扫描点的某点开始依次取连续的三个点作为样本,根据该样本内三个点两两相互之间的距离确定有无离群点;若有离群点,则进入步骤S4;若无离群点,则本次取样不作处理,继续下一取样;步骤S4、计算所述离群点与另二个点连线之间的距离,并与步骤S1所述距离阈值进行比较;若大于所述距离阈值,则认为该点为噪点,将所述噪点与机器人之间的距离设为零或无穷大;若小于所述距离...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。