Robot positioning method, device, computer readable storage medium and robot
By extracting the corner points and corner points normal vectors in the laser scanning data and constructing the objective function for iterative solution, the accuracy and robustness of robot positioning in weak laser scanning characteristic scenarios are solved, and a more accurate map establishment is achieved.
Patent Information
- Application Number
- CN202210286628.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-03-23
AI Technical Summary
The existing robot positioning methods are inaccurate in weak laser scanning characteristic scenarios, and the accurate map cannot be established, resulting in insufficient robustness.
By obtaining the robot's laser scanning data, the corner points and the corresponding corner points normal vector are extracted and projected into the global coordinate system. The objective function is constructed based on the associated laser point pair, associated angle point pair and corner point normal vector pair, and iteratively solve iteratively to determine the position of the robot relative to the global coordinate system.
Even in weak laser scanning characteristic scenarios, better positioning accuracy and robustness can be achieved and more accurate maps can be created.
Smart Images

Figure CN114739409B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robot technology, and in particular, relates to a robot positioning method, device, computer-readable storage medium and robot. Background Art
[0002] Robot localization and mapping refers to the technology of using sensor information to build a map of the robot's motion scene. In actual application scenarios, two-dimensional laser radar is often used as the main sensor for localization and mapping, and scanning matching based on two-dimensional laser radar is a key technology.
[0003] In the prior art, positioning and mapping are mainly based on point-to-point and point-to-line scanning matching methods. However, this method is mainly suitable for scenes with rich laser scanning features. When the robot enters a scene with weak laser scanning features, the above method usually falls into a local optimum, resulting in inaccurate positioning and insufficient robustness, making it impossible to build an accurate map. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a robot positioning method, device, computer-readable storage medium and robot to solve the problem that the existing robot positioning method is inaccurate and cannot establish an accurate map.
[0005] A first aspect of an embodiment of the present application provides a robot positioning method, which may include:
[0006] Acquire the laser scanning data of the robot, and extract each line segment in the laser scanning data; perform a neighborhood search with the endpoint of the first line segment as the center, the first line segment is any line segment in the laser scanning data; if the endpoint of the second line segment is found in the neighborhood search, calculate the intersection between the straight line where the first line segment is located and the straight line where the second line segment is located; the second line segment is any line segment in the laser scanning data except the first line segment; calculate the endpoint distance according to the intersection, the endpoint of the first line segment and the endpoint of the second line segment; if the endpoint distance is less than a preset distance threshold, determine the intersection as a corner point, and determine the normal vector of the first line segment and the normal vector of the second line segment as the corresponding corner point normal vector;
[0007] Projecting the laser scanning data into a global coordinate system to obtain laser scanning projection data; the global coordinate system is a coordinate system where a preset global map is located;
[0008] Determine an associated laser point pair between a first laser point and a second laser point, an associated corner point pair between a first corner point and a second corner point, and a corresponding corner point normal vector pair; the first laser point is a laser point in the laser scanning projection data, the second laser point is a laser point in the global map, the first corner point is a corner point in the laser scanning projection data, and the second corner point is a corner point in the global map;
[0009] Constructing an objective function according to the associated laser point pairs, the associated corner point pairs, and the corresponding corner point normal vector pairs;
[0010] The objective function is iteratively solved to obtain the position and posture of the robot relative to the global coordinate system.
[0011] In a specific implementation of the first aspect, constructing an objective function according to the associated laser point pairs, the associated corner point pairs, and the corresponding corner point normal vector pairs may include:
[0012] Calculating laser point target items based on the associated laser point pairs;
[0013] Calculate corner point target items according to the associated corner point pairs;
[0014] Calculate a normal vector target item according to the corner point normal vector pair;
[0015] The objective function is constructed according to the laser point target item, the corner point target item and the normal vector target item.
[0016] In a specific implementation of the first aspect, calculating the laser point target item according to the associated laser point pair may include:
[0017] The sum of the Euclidean distances of the associated laser point pairs is determined as the laser point target item.
[0018] In a specific implementation of the first aspect, calculating the corner point target item according to the associated corner point pair may include:
[0019] Calculating the covariance of the second corner point, and calculating the weight of the associated corner point pair according to the covariance;
[0020] The Euclidean distances of the associated corner point pairs are weightedly summed according to the weights to obtain the corner point target item.
[0021] In a specific implementation of the first aspect, calculating a normal vector target item according to the corner point normal vector pair may include:
[0022] Calculating the covariance of the second corner point, and calculating the weight of the associated corner point pair according to the covariance;
[0023] The sum of the cross product bi-norms of the corner point normal vector pairs is weightedly summed according to the weight to obtain a normal vector target item.
[0024] In a specific implementation of the first aspect, constructing the objective function according to the laser point target item, the corner point target item, and the normal vector target item may include:
[0025] The sum of squares of the two norms of the laser point target item, the corner point target item and the normal vector target item is determined as the objective function.
[0026] A second aspect of the embodiments of the present application provides a robot positioning device, which may include:
[0027] A corner point extraction module is used to obtain the laser scanning data of the robot and extract each line segment in the laser scanning data; perform a neighborhood search with the endpoint of the first line segment as the center, the first line segment is any line segment in the laser scanning data; if the neighborhood search finds the endpoint of the second line segment, calculate the intersection between the straight line where the first line segment is located and the straight line where the second line segment is located; the second line segment is any line segment in the laser scanning data except the first line segment; calculate the endpoint distance according to the intersection, the endpoint of the first line segment and the endpoint of the second line segment; if the endpoint distance is less than a preset distance threshold, determine the intersection as a corner point, and determine the normal vector of the first line segment and the normal vector of the second line segment as the corresponding corner point normal vector;
[0028] A map projection module, used for projecting the laser scanning data into a global coordinate system to obtain laser scanning projection data; the global coordinate system is a coordinate system where a preset global map is located;
[0029] an association determination module, used to determine an associated laser point pair between a first laser point and a second laser point, an associated corner point pair between a first corner point and a second corner point, and a corresponding corner point normal vector pair; the first laser point is a laser point in the laser scanning projection data, the second laser point is a laser point in the global map, the first corner point is a corner point in the laser scanning projection data, and the second corner point is a corner point in the global map;
[0030] An objective function construction module, used to construct an objective function according to the associated laser point pairs, the associated corner point pairs and the corresponding corner point normal vector pairs;
[0031] The posture solving module is used to iteratively solve the objective function to obtain the posture of the robot relative to the global coordinate system.
[0032] In a specific implementation of the second aspect, the objective function construction module may specifically include:
[0033] a laser point target item calculation submodule, for calculating the laser point target item according to the associated laser point pair;
[0034] A corner point target item calculation submodule, used to calculate the corner point target item according to the associated corner point pair;
[0035] A normal vector target item calculation submodule, used for calculating a normal vector target item according to the corner point normal vector pair;
[0036] The objective function construction submodule is used to construct the objective function according to the laser point target item, the corner point target item and the normal vector target item.
[0037] In a specific implementation manner of the second aspect, the laser point target item calculation submodule may be specifically configured to: determine the sum of the Euclidean distances of the associated laser point pairs as the laser point target item.
[0038] In a specific implementation of the second aspect, the corner point target item calculation submodule can be specifically used to: calculate the covariance of the second corner point, and calculate the weight of the associated corner point pair based on the covariance; perform weighted summation of the Euclidean distances of the associated corner point pairs according to the weights to obtain the corner point target item.
[0039] In a specific implementation of the second aspect, the normal vector target item calculation submodule can be specifically used to: calculate the covariance of the second corner point, and calculate the weight of the associated corner point pair based on the covariance; perform weighted summation of the sum of the cross product bi-norm of the corner point normal vector pair according to the weight to obtain the normal vector target item.
[0040] In a specific implementation of the second aspect, the objective function construction submodule can be specifically used to: determine the sum of the squares of the bi-norms of the laser point target item, the corner point target item, and the normal vector target item as the objective function.
[0041] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned robot positioning methods are implemented.
[0042] A fourth aspect of an embodiment of the present application provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned robot positioning methods when executing the computer program.
[0043] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a robot, the robot executes the steps of any one of the above-mentioned robot positioning methods.
[0044] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain the laser scanning data of the robot, and extract the corner points and the corresponding corner point normal vectors in the laser scanning data; project the laser scanning data into the global coordinate system to obtain the laser scanning projection data; the global coordinate system is the coordinate system where the preset global map is located; determine the associated laser point pair between the first laser point and the second laser point, the associated corner point pair between the first corner point and the second corner point, and the corresponding corner point normal vector pair; the first laser point is the laser point in the laser scanning projection data, the second laser point is the laser point in the global map, the first corner point is the corner point in the laser scanning projection data, and the second corner point is the corner point in the global map; construct the objective function according to the associated laser point pair, the associated corner point pair, and the corresponding corner point normal vector pair; iteratively solve the objective function to obtain the position and posture of the robot relative to the global coordinate system. Through the embodiments of the present application, even in the weak laser scanning feature scene, it has good positioning accuracy and robustness, and can establish a more accurate map. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 This is a flow chart of an embodiment of a robot positioning method in an embodiment of the present application;
[0047] Figure 2 A schematic flow chart for extracting corner points and corresponding corner point normal vectors from laser scanning data;
[0048] Figure 3 A schematic flow chart for constructing an objective function based on associated laser point pairs, associated corner point pairs, and corresponding corner point normal vector pairs;
[0049] Figure 4 An example diagram of the scan matching process;
[0050] Figure 5 This is a structural diagram of an embodiment of a robot positioning device in an embodiment of the present application;
[0051] Figure 6This is a schematic block diagram of a robot in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0053] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0054] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0055] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0056] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0057] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0058] Generally, positioning and mapping can be performed based on point-to-point or point-to-line scanning matching methods. However, this method only considers the relationship between points or the relationship between points and lines. In the point-to-point scanning matching method, there is no feature association between the two points. Therefore, it is impossible to accurately find the exact association between points in the weak laser scanning feature scene. However, the wrong association often causes the optimization solution to fall into the local optimum or even solve the wrong scanning matching results. The point-to-line scanning matching method has inaccurate positioning and insufficient robustness in the scene of long straight corridors due to insufficient lateral constraints.
[0059] In an embodiment of the present application, a new scanning matching method is proposed to address this problem. The robot's posture is iteratively solved based on the associated laser point pairs, associated corner point pairs, and corresponding corner point normal vector pairs between the laser scanning data and the global map. Even in scenes with weak laser scanning features, the method has good positioning accuracy and robustness, and can build a more accurate map.
[0060] See also Figure 1 , an embodiment of a robot positioning method in an embodiment of the present application may include:
[0061] Step S101: Acquire laser scanning data of the robot, and extract corner points and corresponding corner point normal vectors in the laser scanning data.
[0062] In a specific implementation of an embodiment of the present application, the robot can collect laser scanning data through its own laser radar, and the specific scanning period can be set according to the actual situation. For example, it can be set to 0.1 seconds, 0.2 seconds, 0.5 seconds, 1 second or other values, which is not specifically limited in the embodiment of the present application. During the periodic scanning process, the laser radar can collect a frame of laser scanning data every scanning cycle. After obtaining each frame of laser scanning data, the robot can perform positioning through scan matching according to the method in the embodiment of the present application.
[0063] In a specific implementation method of an embodiment of the present application, after acquiring a frame of laser scanning data, the robot can first use the robot posture prediction obtained by using information such as the odometer or filter to correct the motion distortion of the laser scanning data, thereby obtaining the corrected laser scanning data, and extract the corner points and the corresponding corner point normal vectors based on the corrected laser scanning data.
[0064] like Figure 2 As shown, the process of extracting corner points and corresponding corner point normal vectors from laser scanning data may specifically include the following steps:
[0065] Step S1011, extracting each line segment in the laser scanning data.
[0066] By segmenting the laser scanning data, each line segment can be obtained. The endpoints of each line segment are counted, and by performing straight line fitting on each line segment, the straight line equation ax+by=0 of the line segment is obtained.
[0067] Step S1012: Perform a neighborhood search with the endpoint of the first line segment as the center.
[0068] The first line segment is any line segment in the laser scanning data. Other line segments close to the first line segment can be found by performing a neighborhood search.
[0069] Step S1013: If the endpoint of the second line segment is found in the neighborhood search, the intersection point between the straight line where the first line segment is located and the straight line where the second line segment is located is calculated.
[0070] The second line segment is any line segment in the laser scanning data except the first line segment. Using the above fitted straight line equation, the intersection point between the straight line where the first line segment is located and the straight line where the second line segment is located can be obtained.
[0071] If no endpoints of other line segments can be found, continue to traverse other line segments that have not been traversed yet, and use the line segment as the first line segment for neighborhood search.
[0072] Step S1014: Calculate the endpoint distance according to the intersection point, the endpoint of the first line segment, and the endpoint of the second line segment.
[0073] The endpoint distance is the sum of the distance from the intersection point to the endpoint of the first line segment (i.e., the endpoint serving as the center of the neighborhood search) and the distance from the intersection point to the endpoint of the second line segment (i.e., the endpoint found by the neighborhood search).
[0074] Step S1015: If the endpoint distance is less than a preset distance threshold, the intersection point is determined as a corner point, and the normal vector of the first line segment and the normal vector of the second line segment are determined as corresponding corner point normal vectors.
[0075] Among them, the distance threshold can be set according to actual conditions, and the embodiments of the present application do not specifically limit it.
[0076] If the endpoint distance is greater than or equal to the distance threshold, continue to traverse other line segments that have not been traversed, and use the line segment as the first line segment for neighborhood search.
[0077] By traversing all line segments in the laser scanning data through the above process, all corner points and corresponding corner point normal vectors in the laser scanning data can be extracted.
[0078] Step S102: Project the laser scanning data into the global coordinate system to obtain laser scanning projection data.
[0079] The global coordinate system is the coordinate system of the preset global map. In a specific implementation of the embodiment of the present application, the odometer motion prediction pose Pose(x, y, θ) can be first obtained, and for each laser point P(p x ,p y ), can be projected into the global coordinate system as follows to obtain the projected laser point P′(p′ x ,p′ y ):
[0080] p′ x =p x cos(θ)+p y sin(θ)+x
[0081] p′ y =-p x sin(θ)+p y cos(θ)+y
[0082] Among them, (x, y, θ) is the predicted pose of the odometer motion, (p x ,p y ) is the coordinate of the laser point in the laser scanning data, (p′ x ,p′ y ) are the coordinates of the corresponding projection laser point in the laser scanning projection data.
[0083] Similarly, for each corner point P in the laser scanning data c (p cx ,p cy ), we can use the above projection method to project it into the global coordinate system and get the projection corner point P′ c (p′ cx ,p′ cy ). Among them, (p cx ,p cy ) is the coordinate of the corner point in the laser scanning data, (p′ cx ,p′ cy ) are the coordinates of the corresponding projection corner point in the laser scanning projection data.
[0084] Step S103: determining an associated laser point pair between the first laser point and the second laser point, an associated corner point pair between the first corner point and the second corner point, and a corresponding corner point normal vector pair.
[0085] The first laser point is a laser point in the laser scanning projection data, the second laser point is a laser point in the global map, the first corner point is a corner point in the laser scanning projection data, and the second corner point is a corner point in the global map.
[0086] For each first laser point P′(p′ x,p′ y ), a neighborhood search can be performed in the global map with a preset radius to obtain the corresponding second laser point P m (p mx ,p my ) to form an associated laser point pair {P ′ , P m}. Among them, (p mx ,p my ) is the coordinate of the second laser point.
[0087] For each first corner point P′ c (p′ cx ,p′ cy ), the corresponding second corner point P can be obtained by searching from the corner point queue stored in the global map according to the corner point coordinates, angle size, and angle edge orientation as features. mc (p mcx ,p mcy ), to form the associated corner point pair {P′ c , P mc}. Accordingly, the first corner point P c ′ The normalized normal vectors of the two corresponding edges The second corner point P associated with mc The normalized normal vectors of the two corresponding edges Constitutes the corresponding corner point normal vector pair
[0088] Step S104: construct an objective function according to the associated laser point pairs, the associated corner point pairs and the corresponding corner point normal vector pairs.
[0089] In a specific implementation of the embodiment of the present application, step S104 may specifically include the following: Figure 3 The process shown:
[0090] Step S1041, calculating laser point target items according to associated laser point pairs.
[0091] In a specific implementation of the embodiment of the present application, the sum of the Euclidean distances of the associated laser point pairs may be determined as the laser point target item, as shown in the following formula:
[0092]
[0093] Where i is the serial number of the associated laser point pair, ||P′ i -P m,i ||2 is the Euclidean distance of the i-th associated laser point pair, It is the laser point target item.
[0094] Step S1042: Calculate corner point target items based on associated corner point pairs.
[0095] In a specific implementation of an embodiment of the present application, the covariance of the second corner point can be calculated first, and the covariance of the second corner point can be updated after each frame of laser scanning data is acquired. Specifically, after the first frame of laser scanning data is acquired, the extracted second corner point is directly saved to the corner point queue of the global map, and the covariance of the second corner point uses a preset initial value. The specific initial value can be set according to the actual situation, and the embodiment of the present application does not specifically limit this. Figure 1 The process shown solves the pose corresponding to the first frame of laser scanning data.
[0096] After obtaining the n+1th frame of laser scanning data, the corner point in the n+1th frame of laser scanning data can be projected into the global coordinate system using the posture corresponding to the nth frame of laser scanning data to obtain the optimized projection corner point P′ c,opt (p′ xopt ,p′ yopt ), perform neighborhood search on the optimized projection corner point to find the corresponding second corner point P mc (p mcx ,p mcy ), at the second corner point P mc (p mcx ,p mcy ) maintains the counter n and all the projection corner points P′ associated with it. c,opt The sum of coordinates S mc (s mcx ,s mcy ). Therefore, the second corner point P mc (p mcx ,p mcy )’s coordinate mean P μ (μ x ,μ y ) is updated as follows:
[0097]
[0098] The covariance of the second corner point is updated as follows:
[0099]
[0100] Where n is a positive integer, P′ c,opt,i Indicates the i-th and second corner points P mc (p mcx ,p mcy ), that is, the projection corner point of the laser scanning data of the i-th frame, is the covariance of the second corner point.
[0101] After the covariance update of the second corner point is completed, the weight of the associated corner point pair can be calculated according to the covariance, and then the Euclidean distance of the associated corner point pair can be weighted summed according to the weight to obtain the corner point target item, as shown in the following formula:
[0102]
[0103] Among them, j is the serial number of the associated corner point pair, ||P′ c,j -P mc,j ||2 is the Euclidean distance of the jth associated corner point pair, is the covariance of the second corner point in the jth associated corner point pair, Trace is the function for finding the trace, is the corner target item.
[0104] Step S1043, calculating the normal vector target item according to the corner point normal vector pair.
[0105] In a specific implementation of the embodiment of the present application, the covariance of the second corner point can be calculated, and the weight of the associated corner point pair can be calculated based on the covariance. Then, the sum of the cross product norm of the corner point normal vector pair is weighted and summed according to the weight to obtain the normal vector target item, as shown in the following formula:
[0106]
[0107]
[0108] in, is the pair of normal vectors of the corner points corresponding to the jth associated corner point pair, is the normal vector target item.
[0109] Step S1044, construct an objective function according to the laser point target item, the corner point target item and the normal vector target item.
[0110] In a specific implementation of the embodiment of the present application, the sum of the squares of the two norms of the laser point target item, the corner point target item, and the normal vector target item can be determined as the objective function, as shown in the following formula:
[0111]
[0112] in, This is the objective function. The objective function includes the Euclidean distance of the associated laser point pair, the Euclidean distance of the associated corner point pair, and the cross product bi-norm of the corner point normal vector pair. In particular, the corner point P in the global map is considered in the objective item related to the corner point. mc (p mcx ,p mcy ), which can be dynamically adjusted during the scan matching process / map update process.
[0113] Step S105: Iteratively solve the objective function to obtain the position and posture of the robot relative to the global coordinate system.
[0114] In a specific implementation of the embodiment of the present application, a nonlinear optimization method such as Gauss-Newton is used to minimize With the goal as the goal, the position and posture of the robot's lidar relative to the global coordinate system can be iteratively solved, thus realizing scan matching.
[0115] Figure 4 The following is an example of the scan matching process. First, the odometer motion prediction is used to project the laser scan data into the global coordinate system. The laser scan data is segmented and fitted. The segmentation endpoint information is used to find the associated straight line, calculate the intersection point, and project it into the global coordinate system to obtain the projection corner point P′. c ,in is the corresponding normal vector. Further, according to the objective function construction method, the objective function is constructed using the associated laser point pairs, associated corner point pairs and corresponding corner point normal vector pairs. The laser radar pose is taken as the item to be solved and solved using nonlinear optimization method.
[0116] In summary, the embodiment of the present application obtains the laser scanning data of the robot, and extracts the corner points and the corresponding corner point normal vectors in the laser scanning data; projects the laser scanning data into the global coordinate system to obtain laser scanning projection data; the global coordinate system is the coordinate system where the preset global map is located; determines the associated laser point pair between the first laser point and the second laser point, the associated corner point pair between the first corner point and the second corner point, and the corresponding corner point normal vector pair; the first laser point is the laser point in the laser scanning projection data, the second laser point is the laser point in the global map, the first corner point is the corner point in the laser scanning projection data, and the second corner point is the corner point in the global map; constructs an objective function based on the associated laser point pair, the associated corner point pair, and the corresponding corner point normal vector pair; iteratively solves the objective function to obtain the position and posture of the robot relative to the global coordinate system. Through the embodiment of the present application, even in a weak laser scanning feature scene, it has good positioning accuracy and robustness, and can establish a more accurate map.
[0117] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0118] Corresponding to a robot positioning method described in the above embodiment, Figure 5A structural diagram of an embodiment of a robot positioning device provided in an embodiment of the present application is shown.
[0119] In this embodiment, a robot positioning device may include:
[0120] A corner point extraction module 501 is used to obtain laser scanning data of the robot and extract corner points and corresponding corner point normal vectors in the laser scanning data;
[0121] A map projection module 502 is used to project the laser scanning data into a global coordinate system to obtain laser scanning projection data; the global coordinate system is a coordinate system where a preset global map is located;
[0122] An association determination module 503 is used to determine an associated laser point pair between a first laser point and a second laser point, an associated corner point pair between a first corner point and a second corner point, and a corresponding corner point normal vector pair; the first laser point is a laser point in the laser scanning projection data, the second laser point is a laser point in the global map, the first corner point is a corner point in the laser scanning projection data, and the second corner point is a corner point in the global map;
[0123] An objective function construction module 504 is used to construct an objective function according to the associated laser point pairs, the associated corner point pairs and the corresponding corner point normal vector pairs;
[0124] The posture solving module 505 is used to iteratively solve the objective function to obtain the posture of the robot relative to the global coordinate system.
[0125] In a specific implementation of the embodiment of the present application, the objective function construction module may specifically include:
[0126] a laser point target item calculation submodule, for calculating the laser point target item according to the associated laser point pair;
[0127] A corner point target item calculation submodule, used to calculate the corner point target item according to the associated corner point pair;
[0128] A normal vector target item calculation submodule, used for calculating a normal vector target item according to the corner point normal vector pair;
[0129] The objective function construction submodule is used to construct the objective function according to the laser point target item, the corner point target item and the normal vector target item.
[0130] In a specific implementation of the embodiment of the present application, the laser point target item calculation submodule may be specifically used to: determine the sum of the Euclidean distances of the associated laser point pairs as the laser point target item.
[0131] In a specific implementation method of an embodiment of the present application, the corner point target item calculation submodule can be specifically used to: calculate the covariance of the second corner point, and calculate the weight of the associated corner point pair based on the covariance; perform weighted summation of the Euclidean distances of the associated corner point pairs according to the weight to obtain the corner point target item.
[0132] In a specific implementation method of an embodiment of the present application, the normal vector target item calculation submodule can be specifically used to: calculate the covariance of the second corner point, and calculate the weight of the associated corner point pair based on the covariance; perform weighted summation on the sum of the cross product bi-norm of the corner point normal vector pair according to the weight to obtain the normal vector target item.
[0133] In a specific implementation of the embodiment of the present application, the objective function construction submodule can be specifically used to: determine the sum of the squares of the two norms of the laser point target item, the corner point target item and the normal vector target item as the objective function.
[0134] In a specific implementation of an embodiment of the present application, the corner point extraction module can be specifically used to: extract each line segment in the laser scanning data; perform a neighborhood search with the endpoint of the first line segment as the center, the first line segment is any line segment in the laser scanning data; if the endpoint of the second line segment is found in the neighborhood search, calculate the intersection between the straight line where the first line segment is located and the straight line where the second line segment is located; the second line segment is any line segment in the laser scanning data except the first line segment; calculate the endpoint distance based on the intersection, the endpoint of the first line segment and the endpoint of the second line segment; if the endpoint distance is less than a preset distance threshold, determine the intersection as a corner point, and determine the normal vector of the first line segment and the normal vector of the second line segment as the corresponding corner point normal vector.
[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0136] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0137] Figure 6 A schematic block diagram of a robot provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0138] like Figure 6As shown, the robot 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps in the above-mentioned robot positioning method embodiments are implemented, for example Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 5 The functions of modules 501 to 505 are shown.
[0139] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the robot 6.
[0140] Those skilled in the art will understand that Figure 6 It is only an example of the robot 6 and does not constitute a limitation of the robot 6. The robot 6 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the robot 6 may also include input and output devices, network access devices, buses, etc.
[0141] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0142] The memory 61 may be an internal storage unit of the robot 6, such as a hard disk or memory of the robot 6. The memory 61 may also be an external storage device of the robot 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 6. Further, the memory 61 may include both an internal storage unit and an external storage device of the robot 6. The memory 61 is used to store the computer program and other programs and data required by the robot 6. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0143] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices / robots and methods can be implemented in other ways. For example, the device / robot embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0149] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0150] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A robot positioning method, characterized in that: include: Acquire laser scanning data of the robot, and extract each line segment in the laser scanning data; Performing a neighborhood search with the endpoint of a first line segment as the center, where the first line segment is any line segment in the laser scanning data; if the neighborhood search finds the endpoint of a second line segment, calculating the intersection point between the straight line where the first line segment is located and the straight line where the second line segment is located; The second line segment is any line segment in the laser scanning data except the first line segment; the endpoint distance is calculated according to the intersection point, the endpoint of the first line segment and the endpoint of the second line segment; if the endpoint distance is less than a preset distance threshold, the intersection point is determined as a corner point, and the normal vector of the first line segment and the normal vector of the second line segment are determined as corresponding corner point normal vectors; Projecting the laser scanning data into a global coordinate system to obtain laser scanning projection data; the global coordinate system is a coordinate system where a preset global map is located; Determine an associated laser point pair between a first laser point and a second laser point, an associated corner point pair between a first corner point and a second corner point, and a corresponding corner point normal vector pair; the first laser point is a laser point in the laser scanning projection data, the second laser point is a laser point in the global map, the first corner point is a corner point in the laser scanning projection data, and the second corner point is a corner point in the global map; Constructing an objective function according to the associated laser point pairs, the associated corner point pairs, and the corresponding corner point normal vector pairs; The objective function is iteratively solved to obtain the position and posture of the robot relative to the global coordinate system.
2. The robot positioning method according to claim 1, characterized in that: The constructing of the objective function according to the associated laser point pairs, the associated corner point pairs and the corresponding corner point normal vector pairs comprises: Calculating laser point target items based on the associated laser point pairs; Calculate corner point target items according to the associated corner point pairs; Calculate a normal vector target item according to the corner point normal vector pair; The objective function is constructed according to the laser point target item, the corner point target item and the normal vector target item.
3. The robot positioning method according to claim 2, characterized in that: The step of calculating the laser point target item according to the associated laser point pair comprises: The sum of the Euclidean distances of the associated laser point pairs is determined as the laser point target item.
4. The robot positioning method according to claim 2, characterized in that: The calculating the corner point target item according to the associated corner point pair comprises: Calculating the covariance of the second corner point, and calculating the weight of the associated corner point pair according to the covariance; The Euclidean distances of the associated corner point pairs are weightedly summed according to the weights to obtain the corner point target item.
5. The robot positioning method according to claim 2, characterized in that: The calculating the normal vector target item according to the corner point normal vector pair comprises: Calculating the covariance of the second corner point, and calculating the weight of the associated corner point pair according to the covariance; The sum of the cross product bi-norms of the corner point normal vector pairs is weightedly summed according to the weight to obtain a normal vector target item.
6. The robot positioning method according to claim 2, characterized in that: The constructing the objective function according to the laser point target item, the corner point target item and the normal vector target item comprises: The sum of squares of the two norms of the laser point target item, the corner point target item and the normal vector target item is determined as the objective function.
7. A robot positioning device, characterized in that: include: A corner point extraction module, used to obtain the laser scanning data of the robot and extract each line segment in the laser scanning data; Performing a neighborhood search with the endpoint of a first line segment as the center, where the first line segment is any line segment in the laser scanning data; if the neighborhood search finds the endpoint of a second line segment, calculating the intersection point between the straight line where the first line segment is located and the straight line where the second line segment is located; The second line segment is any line segment in the laser scanning data except the first line segment; the endpoint distance is calculated according to the intersection point, the endpoint of the first line segment and the endpoint of the second line segment; if the endpoint distance is less than a preset distance threshold, the intersection point is determined as a corner point, and the normal vector of the first line segment and the normal vector of the second line segment are determined as corresponding corner point normal vectors; A map projection module, used for projecting the laser scanning data into a global coordinate system to obtain laser scanning projection data; the global coordinate system is a coordinate system where a preset global map is located; an association determination module, used to determine an associated laser point pair between a first laser point and a second laser point, an associated corner point pair between a first corner point and a second corner point, and a corresponding corner point normal vector pair; the first laser point is a laser point in the laser scanning projection data, the second laser point is a laser point in the global map, the first corner point is a corner point in the laser scanning projection data, and the second corner point is a corner point in the global map; An objective function construction module, used to construct an objective function according to the associated laser point pairs, the associated corner point pairs and the corresponding corner point normal vector pairs; The posture solving module is used to iteratively solve the objective function to obtain the posture of the robot relative to the global coordinate system.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the robot positioning method according to any one of claims 1 to 6 are implemented.
9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the robot positioning method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Mobile robot positioning method based on laser radar scan matching algorithm
CN109100731A
Laser SLAM method based on surface line corner feature extraction
CN111583369A