WO2022183785A1 - Robot positioning method and apparatus, robot, and readable storage medium - Google Patents

Robot positioning method and apparatus, robot, and readable storage medium Download PDF

Info

Publication number
WO2022183785A1
WO2022183785A1 PCT/CN2021/132992 CN2021132992W WO2022183785A1 WO 2022183785 A1 WO2022183785 A1 WO 2022183785A1 CN 2021132992 W CN2021132992 W CN 2021132992W WO 2022183785 A1 WO2022183785 A1 WO 2022183785A1
Authority
WO
WIPO (PCT)
Prior art keywords
pose
robot
point cloud
laser point
positioning
Prior art date
Application number
PCT/CN2021/132992
Other languages
French (fr)
Chinese (zh)
Inventor
谷雨隆
张思民
赵云
Original Assignee
深圳市优必选科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市优必选科技股份有限公司 filed Critical 深圳市优必选科技股份有限公司
Publication of WO2022183785A1 publication Critical patent/WO2022183785A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/88Lidar systems specially adapted for specific applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

A robot positioning method and apparatus, a robot, and a readable storage medium. Said method comprises: performing positioning once on the position of a robot to obtain a first pose; and by taking the first pose as an initial pose of the robot, performing coordinate conversion on the coordinates of a laser point cloud, and performing gradient search on a score optimization function of the corresponding laser point cloud by using the converted coordinates so as to solve a scan matching pose, the scan matching pose being taken as a second pose of the robot. Finally, the first pose or the second pose is selected as the final positioning result according to whether the second pose satisfies a preset matching condition. The present invention can be adapted to different environments and scenarios, and can achieve stable positioning when very high accuracy is not required, whilst achieving required accuracy in some scenarios, and thus has relatively strong positioning robustness. The positioning apparatus corresponds to the positioning method; the robot executes the positioning method; and the readable storage medium stores a computer program for implementing the positioning method.

Description

机器人定位方法、装置、机器人和可读存储介质Robot positioning method, device, robot and readable storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2021年03月05日提交中国专利局的申请号为2021102469536、名称为“机器人定位方法、装置、机器人和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 2021102469536 and entitled "Robot Positioning Method, Device, Robot and Readable Storage Medium" filed with the China Patent Office on March 05, 2021, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及机器人定位技术领域,尤其涉及一种机器人定位方法、装置、机器人和可读存储介质。The present application relates to the technical field of robot positioning, and in particular, to a robot positioning method, device, robot and readable storage medium.
背景技术Background technique
为了让机器人能够在不同的场景满足不同的需求,机器人定位精度是一个重要的指标。机器人激光定位技术的原理在于,通过激光雷达扫描到的特征反算出机器人自身的位置,这是一种相对定位技术。In order for robots to meet different needs in different scenarios, robot positioning accuracy is an important indicator. The principle of robot laser positioning technology is to calculate the position of the robot itself through the features scanned by lidar, which is a relative positioning technology.
这种相对定位技术非常容易受到周围环境变化的影响,同时周围环境形成的地图也是由激光雷达预先扫描建立的,在地图生成过程中会给地图设置一个分辨率(如一个像素代表实际当中的5cm),通常这个分辨率会兼顾导航精度和计算量,受地图分辨率的影响,故导航精度也将受到一定的制约。所以针对需要达到高精度定位(如3cm内)且对定位的稳定性要求也较高的场景,如地面不平导致定位偏移,需要迅速校正定位等,此时有个高精度且鲁棒的定位系统是一项迫切需要解决的技术问题。This relative positioning technology is very easily affected by changes in the surrounding environment. At the same time, the map formed by the surrounding environment is also pre-scanned and established by lidar. During the map generation process, a resolution will be set for the map (for example, one pixel represents the actual 5cm ), usually this resolution will take into account both the navigation accuracy and the amount of calculation, and is affected by the map resolution, so the navigation accuracy will also be subject to certain constraints. Therefore, for scenarios that need to achieve high-precision positioning (such as within 3cm) and have high requirements for positioning stability, such as positioning deviation caused by uneven ground, and need to quickly correct positioning, etc., there is a high-precision and robust positioning at this time. The system is a technical problem that needs to be solved urgently.
申请内容Application content
有鉴于此,本申请为了克服现有技术中的不足,提供一种机器人定位方法、装置、机器人和可读存储介质。In view of this, in order to overcome the deficiencies in the prior art, the present application provides a robot positioning method, device, robot and readable storage medium.
本申请的实施例提供一种机器人定位方法,所述机器人搭载有激光雷达,所述方法包括:An embodiment of the present application provides a method for positioning a robot, where the robot is equipped with a lidar, and the method includes:
对机器人的位置进行一次定位以得到第一位姿;Position the robot once to get the first pose;
将所述第一位姿作为所述机器人的初始位姿,利用所述初始位姿将当前激光点云在 栅格地图中的坐标转换到机器人坐标系下的坐标以得到所述激光点云的转换坐标;Take the first pose as the initial pose of the robot, and use the initial pose to convert the coordinates of the current laser point cloud in the grid map to the coordinates under the robot coordinate system to obtain the coordinates of the laser point cloud. convert coordinates;
基于所述初始位姿和所述转换坐标对相应激光点云的得分优化函数进行梯度寻优以求解所述激光雷达的扫描数据与所述栅格地图的匹配位姿,所述匹配位姿作为所述机器人的第二位姿;其中,所述得分优化函数根据激光点云的转换坐标及激光点云在栅格地图中所在栅格的高斯分布信息构建;Gradient optimization is performed on the score optimization function of the corresponding laser point cloud based on the initial pose and the transformed coordinates to solve the matching pose between the scanning data of the lidar and the grid map, and the matching pose is taken as The second pose of the robot; wherein, the score optimization function is constructed according to the converted coordinates of the laser point cloud and the Gaussian distribution information of the grid where the laser point cloud is located in the grid map;
在所述第二位姿满足预设匹配条件的情况下,将所述第二位姿作为所述机器人当前的最终位姿,在不满足所述预设匹配条件的情况下,将所述第一位姿作为所述机器人当前的最终位姿。In the case that the second pose satisfies the preset matching condition, the second pose is used as the current final pose of the robot, and in the case that the preset matching condition is not satisfied, the first pose One pose is the current final pose of the robot.
在一些实施例中,所述第二位姿满足预设匹配条件,包括:In some embodiments, the second pose satisfies a preset matching condition, including:
所述第二位姿下所述激光点云的得分大于或等于置信度阈值,并且所述第二位姿和所述第一位姿之间的差值小于或等于预设误差阈值。The score of the laser point cloud under the second pose is greater than or equal to a confidence threshold, and the difference between the second pose and the first pose is less than or equal to a preset error threshold.
在一些实施例中,所述基于所述初始位姿和所述转换坐标对相应激光点云的得分优化函数进行梯度寻优以求解所述激光雷达扫描的数据与所述栅格地图的匹配位姿,包括:In some embodiments, the gradient optimization is performed on the score optimization function of the corresponding laser point cloud based on the initial pose and the transformed coordinates to solve the matching position between the data scanned by the lidar and the grid map. posture, including:
基于所述转换坐标对所述激光点云的得分优化函数利用高斯牛顿迭代算法求解出对应的梯度和黑森矩阵;Using the Gauss-Newton iterative algorithm to solve the corresponding gradient and Hessian matrix for the score optimization function of the laser point cloud based on the transformed coordinates;
将所有激光点云的所述梯度和所述黑森矩阵叠加以计算出当前的位姿增量;Superimposing the gradients of all laser point clouds and the Hessian matrix to calculate the current pose increment;
将所述初始位姿与所述当前位姿增量相加得到第二位姿,其中,在所述第二位姿下激光雷达的扫描数据与所述栅格地图的匹配程度最高。A second pose is obtained by adding the initial pose and the current pose increment, wherein in the second pose, the scanning data of the lidar and the grid map have the highest matching degree.
在一些实施例中,求解所述机器人的第二位姿之前,所述方法还包括:In some embodiments, before solving the second pose of the robot, the method further includes:
对所述机器人预先加载的地图进行栅格化,得到由若干个栅格构成的栅格地图,以及根据所述栅格地图中障碍物的位置计算出每个栅格的高斯分布的均值和方差。Perform gridization on the map preloaded by the robot to obtain a grid map composed of several grids, and calculate the mean and variance of the Gaussian distribution of each grid according to the positions of obstacles in the grid map .
在一些实施例中,所述对机器人的位置进行一次定位以得到第一位姿,包括:In some embodiments, the positioning of the position of the robot once to obtain the first pose includes:
在所述机器人的初始位置周围随机生成相应数量的粒子,每个粒子具有各自的初始位姿及相同的初始权重;A corresponding number of particles are randomly generated around the initial position of the robot, and each particle has its own initial pose and the same initial weight;
根据移动指令使所述机器人在所述栅格地图中移动,并在每次移动后更新各个粒子的位姿,得到各个粒子的更新位姿;Make the robot move in the grid map according to the movement instruction, and update the pose of each particle after each movement to obtain the updated pose of each particle;
根据所述粒子的更新位姿和所述机器人通过搭载的激光雷达测量得到的观测数据对对应粒子进行权重更新,得到各个粒子的更新权重;Update the weight of the corresponding particle according to the updated pose of the particle and the observation data obtained by the robot through the mounted lidar to obtain the updated weight of each particle;
按照所有粒子的所述更新权重的分布进行粒子重采样以得到重采样的所述数量的粒子,返回上述的移动步骤进行预设次数的迭代;Perform particle resampling according to the distribution of the updated weights of all particles to obtain the resampled number of particles, and return to the above-mentioned moving step to perform a preset number of iterations;
根据最终迭代得到的各个粒子的更新位姿和更新权重计算出所述机器人的第一位姿。The first pose of the robot is calculated according to the updated pose and updated weight of each particle obtained by the final iteration.
在一些实施例中,所述坐标转换的转换公式为:In some embodiments, the transformation formula of the coordinate transformation is:
Figure PCTCN2021132992-appb-000001
Figure PCTCN2021132992-appb-000001
其中,(x i,y i)表示第i个激光点云在栅格地图中的坐标;X′ i表示第i个激光点云在转换后的转换坐标;(T x,T y)表示所述机器人的位置,T θ表示所述机器人的姿态角。 Among them, (x i , y i ) represents the coordinates of the i-th laser point cloud in the grid map; X′ i represents the converted coordinates of the i-th laser point cloud after conversion; (T x , T y ) represents the The position of the robot, T θ represents the attitude angle of the robot.
在上述实施例中,所述第i个激光点云的得分优化函数的表达式为:In the above embodiment, the expression of the score optimization function of the i-th laser point cloud is:
Figure PCTCN2021132992-appb-000002
Figure PCTCN2021132992-appb-000002
其中,q i和∑ i分别表示第i个激光点云所在栅格的高斯分布的均值和方差。 Among them, q i and ∑ i represent the mean and variance of the Gaussian distribution of the grid where the i-th laser point cloud is located, respectively.
本申请的实施例还提供一种机器人定位装置,所述机器人搭载有激光雷达,所述装置包括:The embodiment of the present application also provides a robot positioning device, the robot is equipped with a laser radar, and the device includes:
一次定位模块,用于对机器人的位置进行一次定位以得到第一位姿;A positioning module is used to position the robot once to obtain the first pose;
转换模块,用于将所述第一位姿作为所述机器人的初始位姿,利用所述初始位姿将当前激光点云在栅格地图中的坐标转换到机器人坐标系下的坐标以得到所述激光点云的转换坐标;The conversion module is used for taking the first pose as the initial pose of the robot, and using the initial pose to convert the coordinates of the current laser point cloud in the grid map to the coordinates in the robot coordinate system to obtain the The transformation coordinates of the laser point cloud;
二次定位模块,用于基于所述初始位姿和所述转换坐标对所述激光点云的得分优化函数进行梯度寻优以求解所述激光雷达的扫描数据与所述栅格地图的匹配位姿,所述匹配位姿作为所述机器人的第二位姿;其中,所述得分优化函数根据激光点云的转换坐标及激光点云在栅格地图中所在栅格的高斯分布信息构建;The secondary positioning module is used to perform gradient optimization on the score optimization function of the laser point cloud based on the initial pose and the transformed coordinates to solve the matching position between the scanning data of the laser radar and the grid map. The matching pose is used as the second pose of the robot; wherein, the score optimization function is constructed according to the converted coordinates of the laser point cloud and the Gaussian distribution information of the grid where the laser point cloud is located in the grid map;
定位选取模块,用于在所述第二位姿满足预设匹配条件的情况下,将所述第二位姿作为所述机器人当前的最终位姿,在不满足所述预设匹配条件的情况下,将所述第一位姿作为所述机器人当前的最终位姿。A positioning selection module, configured to use the second pose as the current final pose of the robot when the second pose satisfies a preset matching condition, and when the preset matching condition is not met Next, take the first pose as the current final pose of the robot.
本申请的实施例还提供一种机器人,所述机器人包括处理器和存储器,所述存储器存储有计算机程序,所述计算机程序在所述处理器上执行时,实施上述的机器人定位 方法。An embodiment of the present application further provides a robot, the robot includes a processor and a memory, the memory stores a computer program, and when the computer program is executed on the processor, the above-mentioned robot positioning method is implemented.
本申请的实施例还提供一种可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时,实施上述的机器人定位方法。Embodiments of the present application further provide a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above-mentioned method for positioning a robot.
本申请的实施例具有如下有益效果:The embodiments of the present application have the following beneficial effects:
本申请实施例的机器人定位方法先得到机器人的第一次定位位置;进而以该第一次定位位置为基础,结合机器人的周围环境信息并利用迭代优化的方法来对机器人的位置进行再次求解,得到机器人的第二次定位位置,通过比对这两个定位位置并从中选取出机器人当前的最终定位结果,该方法通过两次定位来确定最终定位位置,能够适应不同的环境和场景,在不需要非常高的精度时能够定位稳定,而有些场景又能达到所需的精度,具有较强的定位鲁棒性等。The robot positioning method of the embodiment of the present application first obtains the first positioning position of the robot; then, based on the first positioning position, combined with the surrounding environment information of the robot and using an iterative optimization method, the position of the robot is solved again, The second positioning position of the robot is obtained, and the current final positioning result of the robot is selected by comparing the two positioning positions. This method determines the final positioning position through two positioning, which can adapt to different environments and scenarios. When very high accuracy is required, the positioning can be stable, and in some scenarios, the required accuracy can be achieved, and it has strong positioning robustness.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following drawings will briefly introduce the drawings that need to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.
图1示出了本申请实施例的机器人定位方法的流程示意图;FIG. 1 shows a schematic flowchart of a robot positioning method according to an embodiment of the present application;
图2示出了本申请实施例的机器人定位方法的一次定位的流程示意图;FIG. 2 shows a schematic flowchart of one positioning of the robot positioning method according to the embodiment of the present application;
图3示出了本申请实施例的机器人定位方法的二次定位的流程示意图;FIG. 3 shows a schematic flowchart of the secondary positioning of the robot positioning method according to the embodiment of the present application;
图4示出了本申请实施例的机器人定位装置的结构示意图。FIG. 4 shows a schematic structural diagram of a robot positioning device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.
通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Thus, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
在下文中,可在本申请的各种实施例中使用的术语“包括”、“具有”及其同源词仅意在表示特定特征、数字、步骤、操作、元件、组件或前述项的组合,并且不应被理解为首先排除一个或更多个其它特征、数字、步骤、操作、元件、组件或前述项的组合的存在或增加一个或更多个特征、数字、步骤、操作、元件、组件或前述项的组合的可能性。Hereinafter, the terms "comprising", "having" and their cognates, which may be used in various embodiments of the present application, are only intended to denote particular features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the presence of or adding one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing or the possibility of a combination of the foregoing.
除非另有限定,否则在这里使用的所有术语(包括技术术语和科学术语)具有与本申请的各种实施例所属领域普通技术人员通常理解的含义相同的含义。所述术语(诸如在一般使用的词典中限定的术语)将被解释为具有与在相关技术领域中的语境含义相同的含义并且将不被解释为具有理想化的含义或过于正式的含义,除非在本申请的各种实施例中被清楚地限定。Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized or overly formal meaning, unless explicitly defined in the various embodiments of the present application.
现有技术中,对于基于粒子滤波的实时定位技术,采用粒子滤波的方法将里程计数据,惯性测量单元(IMU)数据以及激光雷达的测量数据进行数据融合,再通过多个粒子的状态值计算出平均位置作为最终机器人的位置。然而,由于粒子滤波的特性,会保留非常多的次优粒子,用来提高定位的鲁棒性,让粒子滤波不容易因为环境的变化而产生定位跳变,但是次优粒子的存在,就让机器人的定位精度打了折扣,它得到最终的位置是所有粒子的一个平均值,这个值在最优值的附近,因此它达不到很高的定位精度。In the prior art, for the real-time positioning technology based on particle filtering, the method of particle filtering is used to fuse odometer data, inertial measurement unit (IMU) data and lidar measurement data, and then calculate the state values of multiple particles. The average position is taken as the final robot position. However, due to the characteristics of particle filtering, a large number of sub-optimal particles will be retained to improve the robustness of positioning, so that particle filtering is not easy to cause positioning jumps due to changes in the environment, but the existence of sub-optimal particles allows the The positioning accuracy of the robot is reduced, and the final position it gets is an average value of all particles, which is near the optimal value, so it cannot achieve high positioning accuracy.
对于另一种方法,基于优化匹配的实时定位技术,如牛顿优化匹配,相关性匹配等方法,这种方法是利用传感器的运动模型估计一个初始位姿,再通过牛顿迭代或者最小二乘优化等方法,在初始位姿的附近的一定范围内找出一个最优的位姿,这种方法当环境特征明显时,由于它能够计算出最优的位置,故可以得到较高的精度,但是当环境有一定的变化,或者环境相似的区域,位置就会变得不稳定,产生位置跳动,而且当位置跳到错误位置之后由于机器人的运动,会越来越偏离正确的位置,当超过匹配的范围后,会导致无法恢复定位,例如匹配范围为1米,此方法位置漂移超过1米后便无法恢复。For another method, real-time positioning technology based on optimal matching, such as Newton optimal matching, correlation matching and other methods, this method uses the motion model of the sensor to estimate an initial pose, and then uses Newton iteration or least squares optimization, etc. method, find an optimal pose within a certain range near the initial pose, this method can obtain higher accuracy because it can calculate the optimal position when the environmental features are obvious, but when There are certain changes in the environment, or in areas with similar environments, the position will become unstable, resulting in position jumping, and when the position jumps to the wrong position, it will deviate from the correct position more and more due to the movement of the robot. After the range is set, the positioning cannot be recovered. For example, if the matching range is 1 meter, this method cannot be recovered after the position drifts more than 1 meter.
由于上述两种导航定位技术分别存在相应缺陷,为此,本申请实施例提出一种机器人定位方法,不仅能够抗环境变化,具有较强定位鲁棒性,同时还能够得到高精度的定位结果。本申请实施例的方法将结合粒子滤波算法对机器人进行一次定位,进而以一次定位的结果为二次定位的基础,结合优化匹配的方法来对机器人进行二次定位,通过比对两次定位的结果来选取出最终的定位结果。Since the above two navigation and positioning technologies respectively have corresponding defects, for this reason, an embodiment of the present application proposes a robot positioning method, which can not only resist environmental changes, but also have strong positioning robustness, and can also obtain high-precision positioning results. The method of the embodiment of the present application will combine the particle filter algorithm to perform a primary positioning of the robot, and then use the result of the primary positioning as the basis for the secondary positioning, and combine the optimization and matching method to perform the secondary positioning of the robot. By comparing the two positioning results The result is to select the final positioning result.
实施例1Example 1
请参照图1,本实施例提出一种机器人定位方法,可用于搭配有激光雷达的机器人在不同的场合下的自定位等。Referring to FIG. 1 , this embodiment proposes a method for positioning a robot, which can be used for self-positioning of a robot equipped with a lidar in different situations.
下面对该机器人定位方法进行详细说明。The robot positioning method will be described in detail below.
步骤S110,对机器人的位置进行一次定位以得到第一位姿。In step S110, the position of the robot is positioned once to obtain the first pose.
示范性地,以粒子群滤波算法为例,对机器人的位置进行一次定位,以保证定位的鲁棒性。如图2所示,该第一位姿的获取步骤,包括:Exemplarily, taking the particle swarm filtering algorithm as an example, the position of the robot is positioned once to ensure the robustness of the positioning. As shown in Figure 2, the steps for obtaining the first pose include:
子步骤S111,在机器人的初始位置周围随机生成相应数量的粒子,每个粒子具有各自的初始位姿及相同的初始权重。In sub-step S111, a corresponding number of particles are randomly generated around the initial position of the robot, and each particle has its own initial pose and the same initial weight.
示范性地,可在机器人的初始位置附近生成一系列粒子(即粒子群),这些粒子通常符合相应的分布规律,如高斯分布等。其中,每个粒子的初始位姿包括与机器人之间的距离r和方向角度θ,而距离r可通过二维平面坐标(x,y)来表示。权重w代表该粒子的位姿为机器人的真实位置的概率,在初始状态下,将对所有粒子进行权重归一化处理,可使得每个粒子的初始权重值相同。Exemplarily, a series of particles (ie, particle swarms) can be generated near the initial position of the robot, and these particles generally conform to a corresponding distribution law, such as a Gaussian distribution. Among them, the initial pose of each particle includes the distance r and the direction angle θ between it and the robot, and the distance r can be represented by two-dimensional plane coordinates (x, y). The weight w represents the probability that the pose of the particle is the real position of the robot. In the initial state, the weight normalization process will be performed on all particles, so that the initial weight value of each particle is the same.
进而,通过控制机器人运动,即利用运动模型对这些粒子进行位姿更新,并根据机器人上搭载的激光雷达对周围环境的观测数据,即利用观测模型对这些粒子进行打分,得到各个粒子的权重分布。通过对这些粒子进行权重筛选,最终得到的粒子位姿即作为机器人的位置。Furthermore, by controlling the motion of the robot, that is, using the motion model to update the pose of these particles, and according to the observation data of the surrounding environment from the lidar mounted on the robot, that is, using the observation model to score these particles, and obtain the weight distribution of each particle . Through weight screening of these particles, the final particle pose is taken as the position of the robot.
子步骤S112,根据移动指令使机器人在栅格地图中移动,并在每次移动后更新各个粒子的位姿,得到各个粒子的更新位姿。In sub-step S112, the robot is moved in the grid map according to the movement instruction, and the pose of each particle is updated after each movement to obtain the updated pose of each particle.
示范性地,若总的粒子数量为M,对于M个粒子,其在t时刻的位姿可表示如下:
Figure PCTCN2021132992-appb-000003
当t=0时,即表示为各个粒子的初始位姿。当机器人按照设置的移动指令在栅格地图中移动相应距离后,可根据运动模型来计算出各个粒子的更新位姿,可表示如下:
Figure PCTCN2021132992-appb-000004
其中,u t表示移动机器人的控制信息;f u表示运动模型。
Exemplarily, if the total number of particles is M, for M particles, their poses at time t can be expressed as follows:
Figure PCTCN2021132992-appb-000003
When t=0, it is expressed as the initial pose of each particle. After the robot moves the corresponding distance in the grid map according to the set movement command, the updated pose of each particle can be calculated according to the motion model, which can be expressed as follows:
Figure PCTCN2021132992-appb-000004
Among them, ut represents the control information of the mobile robot; f u represents the motion model.
子步骤S113,根据粒子的更新位姿和机器人通过搭载的激光雷达测量得到的观测数据对对应粒子进行权重更新,得到各个粒子的更新权重。Sub-step S113 , update the weight of the corresponding particle according to the updated pose of the particle and the observation data obtained by the robot through the mounted lidar to obtain the updated weight of each particle.
示范性地,通过观测数据对这些粒子的权重进行更新,可以使得粒子的位姿更加趋近于机器人真实的位置。例如,对于第m个粒子的更新权重,可表示如下:
Figure PCTCN2021132992-appb-000005
其中,z t表示t时刻激光雷达测量得到的观测数据,f z表示观测模型。
Exemplarily, by updating the weights of these particles through observation data, the pose of the particles can be made closer to the real position of the robot. For example, for the update weight of the mth particle, it can be expressed as follows:
Figure PCTCN2021132992-appb-000005
Among them, z t represents the observation data obtained by the lidar measurement at time t, and f z represents the observation model.
子步骤S114,按照所有粒子的所述更新权重的分布进行粒子重采样以得到重采样的所述数量的粒子,返回上述的移动步骤进行预设次数的迭代。Sub-step S114: Perform particle resampling according to the distribution of the updated weights of all particles to obtain the resampled number of particles, and return to the above-mentioned moving step to perform a preset number of iterations.
示范性地,在对所有粒子的权重进行更新后,通过排序粒子权重大小,并按照这些粒子的权重分布进行粒子重采样,得到数量不变的M个粒子,进而返回上述步骤S112,重复执行上述的位姿更新及权重更新步骤,直到执行所述预设次数时停止。Exemplarily, after the weights of all particles are updated, the particle weights are sorted by the size of the particles, and particle resampling is performed according to the weight distribution of these particles, so as to obtain M particles with a constant number, and then return to the above-mentioned step S112, and repeat the above-mentioned steps. The step of updating the pose and updating the weight of 100 stops until the preset number of times is executed.
可以理解,对于权重高的粒子,即越趋近于机器人真实位置的粒子,在重新采样过程中将被保留,而对于权重低的粒子,即位姿不可信的粒子,则将被逐渐丢弃。上述的预设次数可以由机器人预先设置,也可以由机器人预先生成,或者由用户根据实际需求预先设置。当然,上述的迭代次数也可以根据其他条件来约束,如使粒子的权重值满足相应要求等,而并不限于设置的迭代次数。It can be understood that particles with high weights, that is, particles that are closer to the real position of the robot, will be retained during the resampling process, while particles with low weights, that is, particles with unreliable poses, will be gradually discarded. The above-mentioned preset times may be preset by the robot, may also be pre-generated by the robot, or may be preset by the user according to actual needs. Of course, the above-mentioned number of iterations can also be constrained according to other conditions, such as making the weight value of the particle meet corresponding requirements, etc., and is not limited to the set number of iterations.
子步骤S115,根据最终迭代得到的各个粒子的更新位姿和更新权重计算出机器人的第一位姿。Sub-step S115: Calculate the first pose of the robot according to the updated pose and updated weight of each particle obtained by the final iteration.
示范性地,对于最终得到的这些粒子的位姿和权重,例如,可利用加权平均算法等计算出该机器人的第一位姿。当然,基于这些粒子的位姿也可以采用其他的方法来计算出机器人的位置,在此并不作限定。Exemplarily, for the finally obtained poses and weights of the particles, for example, the first pose of the robot may be calculated by using a weighted average algorithm or the like. Of course, other methods may also be used to calculate the position of the robot based on the poses of these particles, which is not limited here.
考虑到采用粒子滤波采用了加权平均的方法来求解位姿,可能会失去了一定的定位精度,为此,本实施例将在求解到第一位姿的基础上,对机器人的位置进行再次求解,此时将根据机器人的周围环境信息,采用高斯牛顿迭代的优化方法,求出机器人的高精度的定位位置。Considering that the weighted average method is used to solve the pose by particle filtering, a certain positioning accuracy may be lost. For this reason, this embodiment will solve the position of the robot again on the basis of solving the first pose. , at this time, according to the surrounding environment information of the robot, the Gauss-Newton iterative optimization method is used to obtain the high-precision positioning position of the robot.
在进行梯度寻优求解之前,本实施例先对机器人预先加载的地图进行栅格化,以得到由若干个栅格构成的栅格地图。进而,根据该地图中的障碍物位置计算出每个栅格的高斯分布的均值和方差。其中,这些栅格的高斯分布的均值和方差将留作后续的匹配优化时使用,而该均值和方差可通过相应的高斯分布的均值和方差计算公式计算得到。Before performing the gradient optimization solution, this embodiment first performs gridization on the map preloaded by the robot, so as to obtain a grid map composed of several grids. Furthermore, the mean and variance of the Gaussian distribution of each grid are calculated according to the position of the obstacles in the map. Among them, the mean and variance of the Gaussian distribution of these grids will be reserved for subsequent matching optimization, and the mean and variance can be calculated by the corresponding calculation formula of the mean and variance of the Gaussian distribution.
步骤S120,将第一位姿作为机器人的初始位姿,利用初始位姿将当前激光点云在栅格地图中的坐标转换到机器人坐标系下的坐标以得到激光点云的转换坐标。Step S120, taking the first pose as the initial pose of the robot, and using the initial pose to convert the coordinates of the current laser point cloud in the grid map to the coordinates in the robot coordinate system to obtain the converted coordinates of the laser point cloud.
示范性地,通过将当前激光点云的坐标转换到地图上,以确定各个激光点云在哪个栅格中,进而可计算每个激光点云在栅格中的得分。可以理解,得分越高,则表示在其 代表的位姿下激光扫描与地图的匹配程度越高,即意味着位姿越接近机器人的真实位姿,反之,匹配程度越低。Exemplarily, by converting the coordinates of the current laser point cloud to the map to determine which grid each laser point cloud is in, then the score of each laser point cloud in the grid can be calculated. It can be understood that the higher the score, the higher the matching degree between the laser scan and the map in the pose represented by it, which means that the pose is closer to the real pose of the robot, otherwise, the matching degree is lower.
在一种实施方式中,若激光点云在栅格地图中的坐标为(x i,y i),第i个激光点云在转换后的转换坐标为X′ i,于是,坐标转换的转换公式为: In one embodiment, if the coordinates of the laser point cloud in the grid map are (x i , y i ), the transformation coordinates of the i-th laser point cloud after transformation are X′ i , so the transformation of the coordinate transformation The formula is:
Figure PCTCN2021132992-appb-000006
Figure PCTCN2021132992-appb-000006
其中,对于机器人的位姿T=(T x,T y,T θ),(T x,T y)和T θ分别表示机器人的坐标位置和姿态角。 Among them, for the pose of the robot T=(T x , Ty , T θ ), (T x , Ty ) and T θ represent the coordinate position and attitude angle of the robot, respectively.
步骤S130,基于初始位姿和所述转换坐标对激光点云的得分优化函数进行梯度寻优以求解激光雷达的扫描数据与栅格地图的匹配位姿,所述匹配位姿作为机器人的第二位姿。Step S130, based on the initial pose and the transformed coordinates, perform gradient optimization on the score optimization function of the laser point cloud to solve the matching pose between the scanning data of the laser radar and the grid map, and the matching pose is used as the second position of the robot. pose.
示范性地,每个激光点云的得分优化函数根据激光点云的转换坐标及激光点云在栅格地图中所在栅格的高斯分布信息预先构建,例如,该高斯分布信息可包括均值和方差等。在一种实施方式中,第i个激光点云的得分优化函数可表示为:Exemplarily, the score optimization function of each laser point cloud is pre-built according to the converted coordinates of the laser point cloud and the Gaussian distribution information of the grid where the laser point cloud is located in the grid map. For example, the Gaussian distribution information may include mean and variance. Wait. In one embodiment, the score optimization function of the i-th laser point cloud can be expressed as:
Figure PCTCN2021132992-appb-000007
Figure PCTCN2021132992-appb-000007
其中,q i和∑ i分别表示第i个激光点云所在栅格的高斯分布的均值和方差。可以理解,每个激光点云的得分优化函数相同。此外,上述的得分优化函数的表达式仅为一种示例,并不仅限于此。 Among them, q i and ∑ i represent the mean and variance of the Gaussian distribution of the grid where the i-th laser point cloud is located, respectively. It can be understood that the score optimization function is the same for each laser point cloud. In addition, the expression of the above-mentioned score optimization function is only an example, and is not limited thereto.
基于预先构建的得分优化函数,可对该得分优化函数进行梯度求解以得到最优位姿。示范性地,如图3所示,第二位姿的求解步骤,包括:Based on the pre-built score optimization function, the gradient solution of the score optimization function can be performed to obtain the optimal pose. Exemplarily, as shown in FIG. 3 , the steps of solving the second pose include:
子步骤S131,基于所述转换坐标对相应激光点云的得分优化函数利用高斯牛顿迭代算法求解出对应的梯度和黑森矩阵。Sub-step S131 , using the Gauss-Newton iterative algorithm to solve the corresponding gradient and Hessian matrix for the score optimization function of the corresponding laser point cloud based on the transformed coordinates.
示范性地,通过对得分优化函数的表达式中机器人的位姿进行一阶求导,可得到由一阶导数构成的雅克比(Jacobian)矩阵,其中,梯度为一阶导数构成的方向向量。进而,对一阶导数的表达式进行二阶求偏导,可得到由二阶偏导数构成的黑森(Hessian)矩阵。Exemplarily, by taking the first-order derivation of the pose of the robot in the expression of the score optimization function, a Jacobian matrix composed of the first-order derivatives can be obtained, wherein the gradient is a direction vector composed of the first-order derivatives. Furthermore, the second-order partial derivative is performed on the expression of the first-order derivative, and the Hessian matrix composed of the second-order partial derivative can be obtained.
子步骤S132,将所有激光点云的所述梯度和所述黑森矩阵叠加以计算出当前的位姿 增量。Sub-step S132, superimpose the gradients of all laser point clouds and the Hessian matrix to calculate the current pose increment.
例如,仍以上述的得分优化函数的表达式为例,机器人的位姿为T,对于第i个激光点云,其一阶导数的表达式有:For example, still taking the expression of the above score optimization function as an example, the pose of the robot is T, and for the i-th laser point cloud, the expression of its first derivative is:
Figure PCTCN2021132992-appb-000008
Figure PCTCN2021132992-appb-000008
以及,二阶偏导数的表达式为:And, the expression for the second-order partial derivative is:
Figure PCTCN2021132992-appb-000009
Figure PCTCN2021132992-appb-000009
于是,求解的梯度dTr为:
Figure PCTCN2021132992-appb-000010
其中,p i表示第i个激光点云的匹配概率。
Therefore, the solved gradient dTr is:
Figure PCTCN2021132992-appb-000010
Among them, pi represents the matching probability of the ith laser point cloud.
示范性地,在求解出每个激光点云的梯度和黑森矩阵叠加,可得到最终的位姿优化增量ΔT,其中,ΔT=H -1dTr。 Exemplarily, after solving the gradient of each laser point cloud and the Hessian matrix superposition, the final pose optimization increment ΔT can be obtained, where ΔT=H −1 dTr.
子步骤S133,将所述初始位姿与所述当前位姿增量相加得到第二位姿。Sub-step S133, adding the initial pose and the current pose increment to obtain a second pose.
示范性地,若初始位姿为T 0,于是,该第二位姿为T 0+ΔT。其中,该第二位姿用于实现激光雷达的扫描数据与栅格地图达到最佳对准。 Exemplarily, if the initial pose is T 0 , then the second pose is T 0 +ΔT. Among them, the second pose is used to achieve optimal alignment between the scan data of the lidar and the raster map.
本实施例中,根据第二位姿是否满足预设匹配条件来选取第一位姿或第二位姿作为机器人当前的最终位姿。通过将两个定位位置进行比较并从中选取出一个作为机器人当前的最终定位结果,可以实现在不同的场景得到最优的定位结果。In this embodiment, the first pose or the second pose is selected as the current final pose of the robot according to whether the second pose satisfies the preset matching condition. By comparing the two positioning positions and selecting one of them as the current final positioning result of the robot, the optimal positioning results can be obtained in different scenarios.
步骤S140,在第二位姿满足预设匹配条件的情况下,将第二位姿作为机器人当前的最终位姿。Step S140, in the case that the second pose satisfies the preset matching condition, the second pose is used as the current final pose of the robot.
在一种实施方式中,该预设匹配条件可为:第二位姿对应的得分大于或等于预先设置的置信度阈值,并且第二位姿和第一位姿之间的差值小于或等于预设误差阈值。可以理解为,当第二位姿本身的得到较高,同时与第一位姿的误差在可接受的偏差范围内,则选取后面得到的定位位置作为最终定位结果。In one embodiment, the preset matching condition may be: the score corresponding to the second pose is greater than or equal to a preset confidence threshold, and the difference between the second pose and the first pose is less than or equal to Preset error threshold. It can be understood that when the second pose itself is obtained relatively high and the error from the first pose is within an acceptable deviation range, the positioning position obtained later is selected as the final positioning result.
步骤S150,在第二位姿不满足预设匹配条件的情况下,将第一位姿作为机器人当前的最终位姿。Step S150, in the case that the second pose does not meet the preset matching condition, the first pose is taken as the current final pose of the robot.
示范性地,若第二位姿对应的得分小于上述的置信度阈值,或者,第二位姿对应 的得分大于或等于上述置信度阈值并且第二位姿和第一位姿之间的差值大于上述的误差阈值时,则将第一位姿作为机器人当前的最终定位位置。Exemplarily, if the score corresponding to the second pose is less than the aforementioned confidence threshold, or, the score corresponding to the second pose is greater than or equal to the aforementioned confidence threshold and the difference between the second pose and the first pose When it is greater than the above error threshold, the first pose is taken as the current final positioning position of the robot.
由于采用迭代优化的方法可以得到一个精准位置,但是考虑到对于环境大幅度变化的场景,在进行迭代优化时是出现发散现象,此时所得到的位置将是错误的。为此,本实施例结合两种定位结果来选取更准确的定位结果。Due to the iterative optimization method, an accurate position can be obtained, but considering that the environment changes greatly, divergence occurs during the iterative optimization, and the position obtained at this time will be wrong. To this end, in this embodiment, two kinds of positioning results are combined to select a more accurate positioning result.
可以理解,当两种定位结果的误差较大时,即表明此时的环境变化较大,故将通过粒子滤波方法得到的第一位姿作为最终的定位结果;反之,当两种定位结果的误差较小时,即表明优化的结果比较可靠,故将通过优化的方法得到的高精度的第二位姿作为最终的定位结果。It can be understood that when the error of the two positioning results is large, it means that the environment at this time changes greatly, so the first pose obtained by the particle filtering method is used as the final positioning result; When the error is small, it means that the optimization result is relatively reliable, so the high-precision second pose obtained by the optimization method is used as the final positioning result.
本实施例的机器人定位方法先通过粒子群滤波的方法进行定位,由于机器人的位置是一个缓慢变化的过程,不会在环境发散时发生跳变,故具有较好的鲁棒性;而第二次定位方法则以该第一次定位位置为基础,根据机器人的周围环境信息,采用迭代优化的方法,得到较高精度的定位,该方法能够适应不同的环境和场景,具有较好的鲁棒性和较高的定位精度等。The robot positioning method of this embodiment is firstly positioned by the particle swarm filtering method. Since the position of the robot is a slowly changing process, it will not jump when the environment diverges, so it has better robustness; and the second The secondary positioning method is based on the first positioning position, and according to the surrounding environment information of the robot, an iterative optimization method is used to obtain a higher-precision positioning. This method can adapt to different environments and scenarios, and has better robustness. performance and high positioning accuracy.
实施例2Example 2
请参照图4,基于上述实施例1的方法,本实施例提出一种机器人定位装置,该机器人搭载有激光雷达,示范性地,该机器人定位装置100包括:Referring to FIG. 4 , based on the method of Embodiment 1 above, this embodiment provides a robot positioning device. The robot is equipped with a laser radar. Exemplarily, the robot positioning device 100 includes:
一次定位模块110用于对机器人的位置进行一次定位以得到第一位姿;The primary positioning module 110 is used for once positioning the position of the robot to obtain the first pose;
转换模块120用于将所述第一位姿作为所述机器人的初始位姿,利用所述初始位姿将当前激光点云在栅格地图中的坐标转换到机器人坐标系下的坐标以得到所述激光点云的转换坐标。The conversion module 120 is configured to use the first pose as the initial pose of the robot, and use the initial pose to convert the coordinates of the current laser point cloud in the grid map to the coordinates in the robot coordinate system to obtain the The transformed coordinates of the laser point cloud.
二次定位模块130用于基于所述初始位姿和所述转换坐标对所述激光点云的得分优化函数进行梯度寻优以求解所述激光雷达的扫描数据与所述栅格地图的匹配位姿,所述匹配位姿作为所述机器人的第二位姿。其中,所述得分优化函数根据激光点云的转换坐标及激光点云在栅格地图中所在栅格的高斯分布信息构建。The secondary positioning module 130 is configured to perform gradient optimization on the score optimization function of the laser point cloud based on the initial pose and the transformed coordinates to solve the matching position between the scan data of the lidar and the grid map. pose, and the matching pose is used as the second pose of the robot. The score optimization function is constructed according to the converted coordinates of the laser point cloud and the Gaussian distribution information of the grid where the laser point cloud is located in the grid map.
定位选取模块140用于在所述第二位姿满足预设匹配条件的情况下,将所述第二位姿作为所述机器人当前的最终位姿,以及,在不满足所述预设匹配条件的情况下,将所述第一位姿作为所述机器人当前的最终位姿。The positioning selection module 140 is configured to use the second pose as the current final pose of the robot when the second pose satisfies a preset matching condition, and, when the preset matching condition is not met In the case of , the first pose is taken as the current final pose of the robot.
可以理解,本实施例的装置对应于上述实施例1的方法,上述实施例1中的可选项 同样适用于本实施例,故在此不再重复描述。It can be understood that the apparatus of this embodiment corresponds to the method of the foregoing Embodiment 1, and the options in the foregoing Embodiment 1 are also applicable to this embodiment, so the description is not repeated here.
本申请还提供了一种机器人,例如,该机器人为移动机器人,在移动过程中能够实现自定位。示范性地,该机器人包括处理器和存储器,其中,存储器存储有计算机程序,处理器通过运行所述计算机程序,从而使机器人执行上述的机器人定位方法或者上述机器人定位装置中的各个模块的功能。The present application also provides a robot, for example, the robot is a mobile robot, which can realize self-positioning during the moving process. Exemplarily, the robot includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program so that the robot executes the functions of the above-mentioned robot positioning method or each module in the above-mentioned robot positioning device.
本申请还提供了一种可读存储介质,用于储存上述机器人中使用的所述计算机程序。The present application also provides a readable storage medium for storing the computer program used in the above-mentioned robot.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和结构图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,结构图和/或流程图中的每个方框、以及结构图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are only schematic. For example, the flowcharts and structural diagrams in the accompanying drawings show the possible implementation architectures and functions of the apparatuses, methods and computer program products according to various embodiments of the present application. and operation. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flow diagrams, and combinations of blocks in the block diagrams and/or flow diagrams, can be implemented using dedicated hardware-based systems that perform the specified functions or actions. be implemented, or may be implemented in a combination of special purpose hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块或单元可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或更多个模块集成形成一个独立的部分。In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是智能手机、个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应 涵盖在本申请的保护范围之内。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application.

Claims (10)

  1. 一种机器人定位方法,其特征在于,所述机器人搭载有激光雷达,所述方法包括:A robot positioning method, characterized in that the robot is equipped with a laser radar, and the method includes:
    对机器人的位置进行一次定位以得到第一位姿;Position the robot once to get the first pose;
    将所述第一位姿作为所述机器人的初始位姿,利用所述初始位姿将当前激光点云在栅格地图中的坐标转换到机器人坐标系下的坐标以得到所述激光点云的转换坐标;Take the first pose as the initial pose of the robot, and use the initial pose to convert the coordinates of the current laser point cloud in the grid map to the coordinates under the robot coordinate system to obtain the coordinates of the laser point cloud. convert coordinates;
    基于所述初始位姿和所述转换坐标对相应激光点云的得分优化函数进行梯度寻优以求解所述激光雷达的扫描数据与所述栅格地图的匹配位姿,所述匹配位姿作为所述机器人的第二位姿;其中,所述得分优化函数根据激光点云的转换坐标及激光点云在栅格地图中所在栅格的高斯分布信息构建;Gradient optimization is performed on the score optimization function of the corresponding laser point cloud based on the initial pose and the transformed coordinates to solve the matching pose between the scanning data of the lidar and the grid map, and the matching pose is taken as The second pose of the robot; wherein, the score optimization function is constructed according to the converted coordinates of the laser point cloud and the Gaussian distribution information of the grid where the laser point cloud is located in the grid map;
    在所述第二位姿满足预设匹配条件的情况下,将所述第二位姿作为所述机器人当前的最终位姿,在不满足所述预设匹配条件的情况下,将所述第一位姿作为所述机器人当前的最终位姿。In the case that the second pose satisfies the preset matching condition, the second pose is used as the current final pose of the robot, and in the case that the preset matching condition is not satisfied, the first pose One pose is the current final pose of the robot.
  2. 根据权利要求1所述的机器人定位方法,其特征在于,所述第二位姿满足预设匹配条件,包括:The robot positioning method according to claim 1, wherein the second pose satisfies a preset matching condition, comprising:
    所述第二位姿下所述激光点云的得分大于或等于置信度阈值,并且所述第二位姿和所述第一位姿之间的差值小于或等于预设误差阈值。The score of the laser point cloud under the second pose is greater than or equal to a confidence threshold, and the difference between the second pose and the first pose is less than or equal to a preset error threshold.
  3. 根据权利要求1或2所述的机器人定位方法,其特征在于,所述基于所述初始位姿和所述转换坐标对相应激光点云的得分优化函数进行梯度寻优以求解所述激光雷达扫描的数据与所述栅格地图的匹配位姿,包括:The robot positioning method according to claim 1 or 2, wherein the score optimization function of the corresponding laser point cloud based on the initial pose and the transformed coordinates is subjected to gradient optimization to solve the lidar scanning The data matches the pose of the raster map, including:
    基于所述转换坐标对所述激光点云的得分优化函数利用高斯牛顿迭代算法求解出对应的梯度和黑森矩阵;Using the Gauss-Newton iterative algorithm to solve the corresponding gradient and Hessian matrix for the score optimization function of the laser point cloud based on the transformed coordinates;
    将所有激光点云的所述梯度和所述黑森矩阵叠加以计算出当前的位姿增量;Superimposing the gradients of all laser point clouds and the Hessian matrix to calculate the current pose increment;
    将所述初始位姿与所述当前的位姿增量相加得到第二位姿,其中,在所述第二位姿下激光雷达的扫描数据与所述栅格地图的匹配程度最高。A second pose is obtained by adding the initial pose and the current pose increment, wherein in the second pose, the scanning data of the lidar and the grid map have the highest matching degree.
  4. 根据权利要求1所述的机器人定位方法,其特征在于,求解所述机器人的第二位姿之前,所述方法还包括:The robot positioning method according to claim 1, wherein before solving the second pose of the robot, the method further comprises:
    对所述机器人预先加载的地图进行栅格化,得到由若干个栅格构成的栅格地图,以及根据所述栅格地图中障碍物的位置计算出每个栅格的高斯分布的均值和方差。Perform gridization on the map preloaded by the robot to obtain a grid map composed of several grids, and calculate the mean and variance of the Gaussian distribution of each grid according to the positions of obstacles in the grid map .
  5. 根据权利要求1所述的机器人定位方法,其特征在于,所述对机器人的位置进行 一次定位以得到第一位姿,包括:robot positioning method according to claim 1, is characterized in that, the position of described robot is positioned once to obtain the first posture, comprising:
    在所述机器人的初始位置周围随机生成相应数量的粒子,每个粒子具有各自的初始位姿及相同的初始权重;A corresponding number of particles are randomly generated around the initial position of the robot, and each particle has its own initial pose and the same initial weight;
    根据移动指令使所述机器人在所述栅格地图中移动,并在每次移动后更新各个粒子的位姿,得到各个粒子的更新位姿;Make the robot move in the grid map according to the movement instruction, and update the pose of each particle after each movement to obtain the updated pose of each particle;
    根据所述粒子的更新位姿和所述机器人通过搭载的激光雷达测量得到的观测数据对对应粒子进行权重更新,得到各个粒子的更新权重;Update the weight of the corresponding particle according to the updated pose of the particle and the observation data obtained by the robot through the mounted lidar to obtain the updated weight of each particle;
    按照所有粒子的所述更新权重的分布进行粒子重采样以得到重采样的所述数量的粒子,返回上述的移动步骤进行预设次数的迭代;Perform particle resampling according to the distribution of the updated weights of all particles to obtain the resampled number of particles, and return to the above-mentioned moving step to perform a preset number of iterations;
    根据最终迭代得到的各个粒子的更新位姿和更新权重计算出所述机器人的第一位姿。The first pose of the robot is calculated according to the updated pose and updated weight of each particle obtained by the final iteration.
  6. 根据权利要求1所述的机器人定位方法,其特征在于,所述坐标转换的转换公式为:The robot positioning method according to claim 1, wherein the transformation formula of the coordinate transformation is:
    Figure PCTCN2021132992-appb-100001
    Figure PCTCN2021132992-appb-100001
    其中,(x i,y i)表示第i个激光点云在栅格地图中的坐标;X′ i表示第i个激光点云在转换后的转换坐标;(T x,T y)表示所述机器人的位置,T θ表示所述机器人的姿态角。 Among them, (x i , y i ) represents the coordinates of the i-th laser point cloud in the grid map; X′ i represents the converted coordinates of the i-th laser point cloud after conversion; (T x , T y ) represents the The position of the robot, T θ represents the attitude angle of the robot.
  7. 根据权利要求6所述的机器人定位方法,其特征在于,所述第i个激光点云的得分优化函数的表达式为:The robot positioning method according to claim 6, wherein the expression of the score optimization function of the i-th laser point cloud is:
    Figure PCTCN2021132992-appb-100002
    Figure PCTCN2021132992-appb-100002
    其中,q i和Σ i分别表示第i个激光点云所在栅格的高斯分布的均值和方差。 Among them, qi and Σ i represent the mean and variance of the Gaussian distribution of the grid where the ith laser point cloud is located, respectively.
  8. 一种机器人定位装置,其特征在于,所述机器人搭载有激光雷达,所述装置包括:A robot positioning device, characterized in that the robot is equipped with a laser radar, and the device includes:
    一次定位模块,用于对机器人的位置进行一次定位以得到第一位姿;A positioning module is used to position the robot once to obtain the first pose;
    转换模块,用于将所述第一位姿作为所述机器人的初始位姿,利用所述初始位姿将当前激光点云在栅格地图中的坐标转换到机器人坐标系下的坐标以得到所述激光点云的转换坐标;The conversion module is used for taking the first pose as the initial pose of the robot, and using the initial pose to convert the coordinates of the current laser point cloud in the grid map to the coordinates in the robot coordinate system to obtain the The transformation coordinates of the laser point cloud;
    二次定位模块,用于基于所述初始位姿和所述转换坐标对所述激光点云的得分优化 函数进行梯度寻优以求解所述激光雷达的扫描数据与所述栅格地图的匹配位姿,所述匹配位姿作为所述机器人的第二位姿;其中,所述得分优化函数根据激光点云的转换坐标及激光点云在栅格地图中所在栅格的高斯分布信息构建;The secondary positioning module is used to perform gradient optimization on the score optimization function of the laser point cloud based on the initial pose and the transformed coordinates to solve the matching position between the scanning data of the laser radar and the grid map. The matching pose is used as the second pose of the robot; wherein, the score optimization function is constructed according to the converted coordinates of the laser point cloud and the Gaussian distribution information of the grid where the laser point cloud is located in the grid map;
    定位选取模块,用于在所述第二位姿满足预设匹配条件的情况下,将所述第二位姿作为所述机器人当前的最终位姿,在不满足所述预设匹配条件的情况下,将所述第一位姿作为所述机器人当前的最终位姿。A positioning selection module, configured to use the second pose as the current final pose of the robot when the second pose satisfies a preset matching condition, and when the preset matching condition is not met Next, take the first pose as the current final pose of the robot.
  9. 一种机器人,其特征在于,所述机器人包括处理器和存储器,所述存储器存储有计算机程序,所述计算机程序在所述处理器上执行时,实施权利要求1-7中任一项所述的机器人定位方法。A robot, characterized in that the robot includes a processor and a memory, the memory stores a computer program, and when the computer program is executed on the processor, any one of claims 1-7 is implemented. robot positioning method.
  10. 一种可读存储介质,其特征在于,其存储有计算机程序,所述计算机程序被处理器执行时,实施根据权利要求1-7中任一项所述的机器人定位方法。A readable storage medium, characterized in that it stores a computer program, and when the computer program is executed by a processor, implements the robot positioning method according to any one of claims 1-7.
PCT/CN2021/132992 2021-03-05 2021-11-25 Robot positioning method and apparatus, robot, and readable storage medium WO2022183785A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110246953.6 2021-03-05
CN202110246953.6A CN113050116B (en) 2021-03-05 2021-03-05 Robot positioning method, apparatus, robot, and readable storage medium

Publications (1)

Publication Number Publication Date
WO2022183785A1 true WO2022183785A1 (en) 2022-09-09

Family

ID=76510211

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/132992 WO2022183785A1 (en) 2021-03-05 2021-11-25 Robot positioning method and apparatus, robot, and readable storage medium

Country Status (2)

Country Link
CN (1) CN113050116B (en)
WO (1) WO2022183785A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115290098A (en) * 2022-09-30 2022-11-04 成都朴为科技有限公司 Robot positioning method and system based on variable step length
CN117689698A (en) * 2024-02-04 2024-03-12 安徽蔚来智驾科技有限公司 Point cloud registration method, intelligent device and storage medium
CN117824667A (en) * 2024-03-06 2024-04-05 成都睿芯行科技有限公司 Fusion positioning method and medium based on two-dimensional code and laser
CN117824667B (en) * 2024-03-06 2024-05-10 成都睿芯行科技有限公司 Fusion positioning method and medium based on two-dimensional code and laser

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113050116B (en) * 2021-03-05 2024-02-27 深圳市优必选科技股份有限公司 Robot positioning method, apparatus, robot, and readable storage medium
CN113671527A (en) * 2021-07-23 2021-11-19 国电南瑞科技股份有限公司 Accurate operation method and device for improving distribution network live working robot
CN113739819B (en) * 2021-08-05 2024-04-16 上海高仙自动化科技发展有限公司 Verification method, verification device, electronic equipment, storage medium and chip

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487535A (en) * 2014-10-09 2016-04-13 东北大学 Mobile robot indoor environment exploration system and control method based on ROS
CN107702722A (en) * 2017-11-07 2018-02-16 云南昆船智能装备有限公司 A kind of las er-guidance AGV natural navigation localization methods
CN107991683A (en) * 2017-11-08 2018-05-04 华中科技大学 A kind of robot autonomous localization method based on laser radar
WO2018180338A1 (en) * 2017-03-30 2018-10-04 パイオニア株式会社 Information processing device, server device, control method, program, and storage medium
CN108917759A (en) * 2018-04-19 2018-11-30 电子科技大学 Mobile robot pose correct algorithm based on multi-level map match
CN109579849A (en) * 2019-01-14 2019-04-05 浙江大华技术股份有限公司 Robot localization method, apparatus and robot and computer storage medium
CN109932713A (en) * 2019-03-04 2019-06-25 北京旷视科技有限公司 Localization method, device, computer equipment, readable storage medium storing program for executing and robot
CN110285806A (en) * 2019-07-05 2019-09-27 电子科技大学 The quick Precision Orientation Algorithm of mobile robot based on the correction of multiple pose
US20200080860A1 (en) * 2018-01-12 2020-03-12 Zhejiang Guozi Robot Technology Co., Ltd. Method and system for creating map based on 3d laser
CN110927740A (en) * 2019-12-06 2020-03-27 合肥科大智能机器人技术有限公司 Mobile robot positioning method
CN111113422A (en) * 2019-12-30 2020-05-08 深圳市优必选科技股份有限公司 Robot positioning method and device, computer readable storage medium and robot
CN111508021A (en) * 2020-03-24 2020-08-07 广州视源电子科技股份有限公司 Pose determination method and device, storage medium and electronic equipment
CN111578959A (en) * 2020-05-19 2020-08-25 鲲鹏通讯(昆山)有限公司 Unknown environment autonomous positioning method based on improved Hector SLAM algorithm
CN111949943A (en) * 2020-07-24 2020-11-17 北京航空航天大学 Vehicle fusion positioning method for V2X and laser point cloud registration for advanced automatic driving
CN112082553A (en) * 2020-07-24 2020-12-15 广州易来特自动驾驶科技有限公司 Indoor positioning method and positioning device based on WIFI and laser radar and robot
CN113050116A (en) * 2021-03-05 2021-06-29 深圳市优必选科技股份有限公司 Robot positioning method and device, robot and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110895408B (en) * 2018-08-22 2023-05-02 杭州海康机器人股份有限公司 Autonomous positioning method and device and mobile robot

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487535A (en) * 2014-10-09 2016-04-13 东北大学 Mobile robot indoor environment exploration system and control method based on ROS
WO2018180338A1 (en) * 2017-03-30 2018-10-04 パイオニア株式会社 Information processing device, server device, control method, program, and storage medium
CN107702722A (en) * 2017-11-07 2018-02-16 云南昆船智能装备有限公司 A kind of las er-guidance AGV natural navigation localization methods
CN107991683A (en) * 2017-11-08 2018-05-04 华中科技大学 A kind of robot autonomous localization method based on laser radar
US20200080860A1 (en) * 2018-01-12 2020-03-12 Zhejiang Guozi Robot Technology Co., Ltd. Method and system for creating map based on 3d laser
CN108917759A (en) * 2018-04-19 2018-11-30 电子科技大学 Mobile robot pose correct algorithm based on multi-level map match
CN109579849A (en) * 2019-01-14 2019-04-05 浙江大华技术股份有限公司 Robot localization method, apparatus and robot and computer storage medium
CN109932713A (en) * 2019-03-04 2019-06-25 北京旷视科技有限公司 Localization method, device, computer equipment, readable storage medium storing program for executing and robot
CN110285806A (en) * 2019-07-05 2019-09-27 电子科技大学 The quick Precision Orientation Algorithm of mobile robot based on the correction of multiple pose
CN110927740A (en) * 2019-12-06 2020-03-27 合肥科大智能机器人技术有限公司 Mobile robot positioning method
CN111113422A (en) * 2019-12-30 2020-05-08 深圳市优必选科技股份有限公司 Robot positioning method and device, computer readable storage medium and robot
CN111508021A (en) * 2020-03-24 2020-08-07 广州视源电子科技股份有限公司 Pose determination method and device, storage medium and electronic equipment
CN111578959A (en) * 2020-05-19 2020-08-25 鲲鹏通讯(昆山)有限公司 Unknown environment autonomous positioning method based on improved Hector SLAM algorithm
CN111949943A (en) * 2020-07-24 2020-11-17 北京航空航天大学 Vehicle fusion positioning method for V2X and laser point cloud registration for advanced automatic driving
CN112082553A (en) * 2020-07-24 2020-12-15 广州易来特自动驾驶科技有限公司 Indoor positioning method and positioning device based on WIFI and laser radar and robot
CN113050116A (en) * 2021-03-05 2021-06-29 深圳市优必选科技股份有限公司 Robot positioning method and device, robot and readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BOURAINE SARA; BOUGOUFFA ABDELHAK; AZOUAOUI OUAHIBA: "Particle swarm optimization for solving a scan-matching problem based on the normal distributions transform", EVOLUTIONARY INTELLIGENCE, SPRINGER BERLIN HEIDELBERG, BERLIN/HEIDELBERG, vol. 15, no. 1, 3 January 2021 (2021-01-03), Berlin/Heidelberg, pages 683 - 694, XP037707769, ISSN: 1864-5909, DOI: 10.1007/s12065-020-00545-y *
HAN MINGRUI: "3D Localization and Mapping of Outdoor Mobile Robots Using a LIDAR", MASTER THESIS, TIANJIN POLYTECHNIC UNIVERSITY, CN, no. 3, 15 March 2017 (2017-03-15), CN , XP055964348, ISSN: 1674-0246 *
LIU YUXIANG: "Mobile Robot Localization Algorithm Based on Multi-sensor Fusion and Point Cloud Matching", MASTER THESIS, TIANJIN POLYTECHNIC UNIVERSITY, CN, no. 7, 15 July 2020 (2020-07-15), CN , XP055964345, ISSN: 1674-0246 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115290098A (en) * 2022-09-30 2022-11-04 成都朴为科技有限公司 Robot positioning method and system based on variable step length
CN117689698A (en) * 2024-02-04 2024-03-12 安徽蔚来智驾科技有限公司 Point cloud registration method, intelligent device and storage medium
CN117689698B (en) * 2024-02-04 2024-04-19 安徽蔚来智驾科技有限公司 Point cloud registration method, intelligent device and storage medium
CN117824667A (en) * 2024-03-06 2024-04-05 成都睿芯行科技有限公司 Fusion positioning method and medium based on two-dimensional code and laser
CN117824667B (en) * 2024-03-06 2024-05-10 成都睿芯行科技有限公司 Fusion positioning method and medium based on two-dimensional code and laser

Also Published As

Publication number Publication date
CN113050116A (en) 2021-06-29
CN113050116B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
WO2022183785A1 (en) Robot positioning method and apparatus, robot, and readable storage medium
CN106599108A (en) Method for constructing multi-mode environmental map in three-dimensional environment
Miki et al. Elevation mapping for locomotion and navigation using gpu
Troiani et al. 2-point-based outlier rejection for camera-imu systems with applications to micro aerial vehicles
CN108332758B (en) Corridor identification method and device for mobile robot
WO2022017131A1 (en) Point cloud data processing method and device, and intelligent driving control method and device
CN106548486A (en) A kind of unmanned vehicle location tracking method based on sparse visual signature map
CN111273312B (en) Intelligent vehicle positioning and loop detection method
Strader et al. Perception‐aware autonomous mast motion planning for planetary exploration rovers
CN110986956A (en) Autonomous learning global positioning method based on improved Monte Carlo algorithm
CN111510704B (en) Method for correcting camera dislocation and device using same
CN111457923B (en) Path planning method, device and storage medium
Caballero et al. DLL: Direct LIDAR Localization. A map-based localization approach for aerial robots
Van Dalen et al. Absolute localization using image alignment and particle filtering
CN111045433B (en) Obstacle avoidance method for robot, robot and computer readable storage medium
JP2022130588A (en) Registration method and apparatus for autonomous vehicle, electronic device, and vehicle
CN116681733A (en) Near-distance real-time pose tracking method for space non-cooperative target
CN112985391B (en) Multi-unmanned aerial vehicle collaborative navigation method and device based on inertia and binocular vision
CN111207754A (en) Particle filter-based multi-robot formation positioning method and robot equipment
CN113954080B (en) Method, device, equipment and medium for planning steering and walking track of robot
CN114115231B (en) Space pose point cloud correction method and system for mobile robot
CN111283730B (en) Robot initial pose acquisition method based on point-line characteristics and starting self-positioning method
CN111123279B (en) Mobile robot repositioning method fusing ND and ICP matching
Kuo et al. A hybrid approach to RBPF based SLAM with grid mapping enhanced by line matching
Chen et al. Multirobot FastSLAM algorithm based on landmark consistency correction

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21928857

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21928857

Country of ref document: EP

Kind code of ref document: A1