Position initialization method and device of intelligent mowing robot and mowing robot
By constructing a priori map using LiDAR and performing image matching and splicing, it solves the problems of low initialization efficiency and insufficient reliability of the position of the intelligent lawn mowing robot, achieves precise position determination in complex environments, and ensures efficient operation of the robot.
Patent Information
- Application Number
- CN202410872283.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-11
AI Technical Summary
The existing position initialization method of intelligent lawn mowing robots is inefficient and unreliable. Especially when the GPS/RTK positioning device is blocked or the visual positioning is affected by changes in lighting, it is difficult to achieve accurate initial position determination.
LiDAR is used to construct a priori map. By collecting multi-frame point cloud data at the starting point and auxiliary markers, a two-dimensional map with the origin and auxiliary markers is generated, and image matching and splicing is performed when the robot restarts, and the pixel difference is used to map the current The position is added to the prior map to implement position initialization.
It improves the position initialization efficiency and reliability of the intelligent lawn mowing robot, avoids dependence on GPS/RTK positioning equipment, and ensures the efficient operation of the robot in complex environments.
Smart Images

Figure CN118760165A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent lawn mowing robots, and in particular to a position initialization method and device for an intelligent lawn mowing robot and the lawn mowing robot. Background Art
[0002] The intelligent mowing robot obtains the surrounding environment information by adopting the method of multi-sensor fusion, and then intelligently plans the mowing path to realize automatic mowing. It can complete the mowing task with less human intervention, greatly reducing the execution cost of mowing. During the operation of the mowing robot, the position of the robot needs to be initialized after each startup, that is, the real position coordinates of the robot's starting position in the working area environment map are determined, so that the mowing path can be planned in the environment map with the initialization position as the starting point. If the robot can accurately initialize the position after each restart, that is, accurately determine the real position coordinates of the robot's position in the map when it restarts, the initial environment map can be reused for mowing path planning, without the need to re-acquire environmental information for global mapping after each restart. Therefore, the accurate initial position can effectively improve the reusability of the map, improve the overall efficiency of mowing in a large area, and make the mowing robot more intelligent.
[0003] In the prior art, the initialization position of an intelligent lawn mowing robot is usually directly obtained using positioning devices such as GPS (Global Positioning System), RTK (Real-time Kinematic) or laser radar. However, positioning devices such as GPS / RTK are easily blocked and cannot be reliably positioned. For example, when approaching tall buildings or tall plants, the positioning accuracy of GPS / RTK positioning devices is no longer reliable. At this time, if the robot is restarted, it is difficult to accurately determine the initial position of the lawn mowing robot, causing the lawn mowing robot to be unable to start working. The robot must wait for the positioning device to return to normal before it can continue to work, affecting the stable operation of the robot. To initialize the initial position of the lawn mowing robot using laser radar, it is first necessary to complete the construction of the prior map, and then use the prior three-dimensional point cloud map and the single-frame or multi-frame point cloud data of the current position for global registration to obtain the initial position based on the prior map, or use the Scan-Context loop detection method to complete the initialization of the initial position. Both the global registration-based and Scan-Context-based methods require a long time, have low initialization efficiency and are complex to implement, require a lot of computing resources, and can easily fall into local optimal problems, resulting in failure to correctly complete the initial position initialization.
[0004] Some practitioners have proposed using image processing based on vision to determine the position of the robot in order to initialize the initial position. Although this method is not easily blocked by objects, it will be affected by various environmental factors such as changes in external lighting. For example, different lighting at different times in the same scene will have a greater impact on the initialization results. Therefore, the actual initialization accuracy is still not high, especially for lawn mowing robots that are usually used outdoors. It is difficult to obtain rich feature information in outdoor scenes to ensure the effectiveness of positioning. Summary of the invention
[0005] The technical problem to be solved by the present invention is: in view of the technical problems existing in the prior art, the present invention provides a position initialization method, device and lawn mowing robot of an intelligent lawn mowing robot with simple implementation method, low cost and complexity, high initialization efficiency and reliability.
[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0007] A method for initializing the position of an intelligent lawn mowing robot, comprising the steps of:
[0008] Step S01. Control the controlled lawn mower robot equipped with a laser radar to move around the boundary of the target working area, construct a map of the lawn mower robot according to the boundary information of the target working area and the point cloud data scanned by the laser radar, and during the operation of the controlled lawn mower robot, first collect the multi-frame point cloud data scanned by the laser radar at the starting position, construct a mark with the starting position as the center as the first origin mark of the current map, and after running for a specified time, construct another mark with the current position point as the center as an auxiliary mark, generate a point cloud map with the first origin mark and the auxiliary mark, and save it as a priori map after converting it into a two-dimensional map;
[0009] Step S02. When the controlled mowing robot is restarted in the target working area, a two-dimensional local image map is constructed by collecting multi-frame point cloud data scanned by the laser radar at the current position point, and a mark is constructed in the local image map with the current position point as the center as the second origin mark, so as to obtain a two-dimensional local image map with the second origin mark;
[0010] Step S03. Match and stitch the prior map with the currently obtained two-dimensional local image map, calculate the pixel difference between the first origin mark and the second origin mark in the stitched image, and map the current position point to the prior map based on the prior information between the first original mark and the auxiliary mark and the calculated pixel difference, so as to complete the position initialization of the lawn mower.
[0011] Furthermore, when constructing an origin mark or an auxiliary mark, an area of a specified shape is constructed with the current position point as the center point as the corresponding mark, and the shapes corresponding to the first origin mark and the second origin mark are different.
[0012] Furthermore, in step S01, converting the generated point cloud map with the first origin mark and the auxiliary mark into a two-dimensional map includes: two-dimensionalizing the generated point cloud map to obtain a Mat matrix type map, wherein the width and height of the two-dimensional map are obtained by the maximum and minimum values of the map in the X and Y axis directions, and the pixels of the corresponding points of the two-dimensional map are filled after normalizing according to the values in the Z axis direction of the point cloud to obtain the final prior map M1.
[0013] Furthermore, in step S03, splicing the prior map with the currently obtained two-dimensional local image map includes:
[0014] Performing key point detection and matching on the prior map and the currently obtained two-dimensional local image map to obtain a matched point cloud pair;
[0015] Solving a transformation matrix between the prior map and the two-dimensional local image map according to the matched point cloud pairs;
[0016] The priori map and the local image map are spliced according to the transformation matrix to obtain a spliced image.
[0017] Furthermore, in the key point detection and matching of the prior map and the currently obtained two-dimensional local image map, a two-dimensional feature matching-based method is used to realize the key point detection and matching between the prior map and the two-dimensional local image map, and the RANSAC (Random Sample Consensus) algorithm is used to filter out the erroneous matching point pairs, and finally obtain the matched point cloud pairs.
[0018] Furthermore, in step S03, mapping the current position point to the prior map according to the information of the first original mark and the auxiliary mark and the calculated pixel difference includes:
[0019] Calculate the real distance corresponding to a single pixel according to the real distance T between the first original mark and the auxiliary mark and the pixel difference K between the first origin mark and the auxiliary mark;
[0020] Calculate the real distance Dr between the first origin mark and the second origin mark according to the pixel distance X between the first origin mark and the second origin mark and the real distance corresponding to the single pixel;
[0021] The current position point is mapped to the corresponding real physical coordinates in the priori map according to the real distance between the first origin mark and the second origin mark.
[0022] Furthermore, the real distance corresponding to a single pixel is calculated according to the formula T / K, and the real distance between the first origin mark and the second origin mark is calculated according to the formula Dr=X×(T / K).
[0023] Furthermore, when the lawn mowing robot system is started, it also includes judging whether the RTK positioning information at the current position is reliable. If it is reliable, the origin position positioning information in the current RTK coordinate system is recorded and saved.
[0024] A position initialization device for an intelligent lawn mowing robot, comprising:
[0025] A priori map generation module is used to control the controlled lawn mower robot equipped with a laser radar to move around the boundary of a target working area, to construct a map of the lawn mower robot according to the boundary information of the target working area and the point cloud data scanned by the laser radar, and to collect multi-frame point cloud data scanned by the laser radar at the starting position during the operation of the controlled lawn mower robot, to construct a mark with the starting position as the center as the first origin mark of the current map, and to construct a mark with the current position as the center as an auxiliary mark after running for a specified time, to generate a point cloud map with the first origin mark and the auxiliary mark, and to save it as a priori map after converting it into a two-dimensional map;
[0026] A two-dimensional local map generation module is used to collect multi-frame point cloud data scanned by the laser radar at the current position point to construct a two-dimensional local image map when the mowing robot restarts in the target working area, and to construct a mark in the local image map with the current position point as the center as the second origin mark, so as to obtain a two-dimensional local image map with the second origin mark;
[0027] An initialization module is used to match and splice the prior map with the currently obtained two-dimensional local image map, calculate the pixel difference between the first origin mark and the second origin mark in the spliced image, and map the current position point to the prior map based on the prior information between the first original mark and the auxiliary mark and the calculated pixel difference, so as to complete the position initialization of the lawn mower.
[0028] A lawn mowing robot is equipped with a laser radar. The lawn mowing robot includes a processor, a memory, a controller and an actuator. The memory is used to store a computer program. The controller is used to control the actuator to perform corresponding actions according to the output of the processor. The processor is used to receive point cloud data obtained by scanning the laser radar and execute the computer program to perform the above method.
[0029] Compared with the prior art, the advantages of the present invention are: the present invention initializes the position of the lawn mowing robot by combining with a laser radar, and simultaneously constructs an origin mark and an auxiliary mark in the map during the process of constructing a priori map, so as to form a two-dimensional priori map with two marks. When the robot is restarted, a two-dimensional local image map with an origin mark is constructed, and then the two-dimensional priori map is matched and spliced with the two-dimensional local image map. The robot position is mapped to the priori map using the prior information marked in the two-dimensional priori map, and the registration problem of the laser radar in the three-dimensional space is converted to the two-dimensional space, so as to realize the rapid and accurate initialization of the initial position of the lawn mowing robot, without relying on the positioning information of the GPS / RTK positioning device, and can solve the problem that the positioning accuracy of the traditional GPS / RTK positioning device is unreliable or the positioning effect is poor due to visual interference, and the position cannot be accurately initialized, thereby ensuring the efficient and reliable operation of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 4 is a schematic diagram of the implementation flow of the position initialization method of the intelligent lawn mowing robot in this embodiment.
[0031] Figure 2 It is a schematic diagram of the detailed implementation process of constructing a priori map in this embodiment.
[0032] Figure 3 4 is a schematic diagram of a detailed implementation flow of initializing the position of the lawn mowing robot after restarting in this embodiment. DETAILED DESCRIPTION
[0033] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0034] As shown in the disclosure of the present invention, unless the context clearly indicates an exception, the words "a", "an", "a kind" and / or "the" do not specifically refer to the singular, but may also include the plural. The words "first", "second" and similar words used in the disclosure of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, the words "include" or "comprise" and the like mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0035] like Figure 1 As shown, the steps of the position initialization method of the intelligent lawn mowing robot in this embodiment include:
[0036] Step S01. Control the controlled lawn mower robot equipped with a laser radar to move around the boundary of the target working area, and construct a map of the lawn mower robot according to the boundary information of the target working area and the point cloud data scanned by the laser radar. During the operation of the lawn mower robot, first collect the multi-frame point cloud data scanned by the laser radar at the starting position, and construct a mark with the starting position as the center as the first origin mark of the current map. After running for a specified time, construct a mark with the current position point as the center in the current map as an auxiliary mark, generate a point cloud map with the first origin mark and the auxiliary mark, and save it as a priori map after converting it into a two-dimensional map.
[0037] In this embodiment, a laser radar is mounted on the controlled lawn mower robot, and the laser radar scans the surrounding environment to obtain point cloud data during the operation of the lawn mower robot. The laser radar can specifically adopt a Mid-360 laser radar with a large field of view. When the lawn mower robot is not moving, the laser radar can still obtain point cloud data in a 360-degree direction centered on itself, and can obtain point cloud data with a large field of view. Of course, other types of laser radar sensors can also be used according to actual needs.
[0038] The map of the intelligent lawn mower robot includes a work area map and a work area point cloud map. This embodiment pre-controls the controlled lawn mower robot to move around the boundary of the target work area, stores the positioning information stored when the lawn mower robot moves at the boundary of the work area as a boundary map, and simultaneously obtains a point cloud map from the three-dimensional point cloud scanned by the laser radar, and splices the boundary map and the point cloud map to form a map of the intelligent lawn mower robot to jointly describe the environmental status of the intelligent lawn mower robot. That is, the constructed map includes two parts: the boundary map of the work area and the point cloud map.
[0039] At the same time, during the operation, firstly, multiple frames of point cloud data are collected at the starting position after the mowing robot is started and before it moves, and then a mark is constructed in the map with the starting position as the center as the first origin mark, and then after the mowing robot has traveled for a certain period of time, another mark is constructed in the map with the current position as the center as the auxiliary mark, that is, a point cloud map with the first origin mark and the auxiliary mark is obtained, and after two-dimensional conversion, a priori map with two marks is obtained. From this priori map, not only the global map can be obtained as priori information, but also the priori information of the real distance T and the pixel difference K between the first origin mark and the auxiliary mark can be obtained, and this priori information can be used to initialize the position after the mowing robot is restarted.
[0040] In this embodiment, when constructing the origin mark or the auxiliary mark, a region of a specified shape is constructed with the current point as the center point as the corresponding mark. Specifically, the mark can be in various shapes such as circle, square, triangle, etc. The shape and size of the origin mark and the auxiliary mark can be the same or different, and can be configured according to actual needs. For example, if the origin mark and the auxiliary mark are square marks of the same size, a square area with a fixed side length λ can be constructed with the starting position point of the robot after startup as the center point of the rectangle as the origin mark of the coordinate system for constructing the current map, that is, the first origin mark. Correspondingly, when the robot travels for a specified time, a square area with a side length of λ with the current point as the center is constructed again as an auxiliary mark of the current position, and the constructed prior map contains both a square origin mark and a square auxiliary mark. The value of the above side length λ can be configured according to actual needs.
[0041] In this embodiment, before constructing the marking point, the Z-axis direction value of the point cloud data in the marking point area is also reset in a differentiated manner, that is, the value of the Z-axis direction of the three-dimensional point cloud in the marking point area is uniformly reset to facilitate highlighting the marking point. For example, the Z value of the point cloud in the marking point area can be modified to 100 or other values, which are within a certain range from the Z value of the point cloud as a whole, so as to avoid a large difference between the two.
[0042] In this embodiment, after generating a point cloud map with a first origin mark and an auxiliary mark, the generated point cloud map is converted into a two-dimensional map, and the steps include: performing two-dimensional processing on the generated point cloud map to obtain a map of the Mat (Matrix) matrix type, that is, the map is rectangular data composed of rows and columns, wherein the width and height of the two-dimensional map are obtained by the maximum and minimum values of the map in the X and Y axis directions, and the pixels of the corresponding points of the two-dimensional map are filled after normalization according to the value in the Z axis direction of the point cloud to obtain the final prior map M1, thereby converting the three-dimensional map into a two-dimensional map form for storage. Compared with the traditional storage of three-dimensional map data, storage in the form of a two-dimensional map can reduce the storage amount and the required storage space.
[0043] In this embodiment, when the lawn mower robot system is started, it also includes determining whether the RTK positioning information at the current position is reliable. If it is reliable, the origin position positioning information in the current RTK coordinate system is recorded and saved, so that the information obtained by both the RTK and the laser radar sensor can be fully utilized as prior information to realize the initialization of the initial position of the lawn mower robot under the prior map, and provide accurate initial position positioning for the lawn mower robot. The above RTK positioning information can also be positioning information obtained by positioning equipment such as GPS.
[0044] Specifically, after the controlled lawn mower robot is started, on the one hand, it determines whether the GPS / RTK positioning information is reliable. If the GPS / RTK positioning is reliable, the origin coordinate position positioning information in the current coordinate system is recorded and saved, that is, the current origin coordinate is normally assigned; if the GPS / RTK positioning is unreliable, the current origin coordinate position information is not saved or the current origin coordinate position is set to zero; on the other hand, the point cloud data scanned by the laser radar is used to construct the prior map M1 in the above manner, and the prior map M1 and the prior information are subsequently used to achieve position initialization. Because when the GPS / RTK positioning device is blocked, the laser radar can still obtain point cloud data for mapping without being affected by the blockage, and when the laser radar fails, it can be reliably positioned with the help of GPS / RTK to obtain initialization information. The probability of the laser radar and GPS / RTK failing at the same time is very low. Therefore, by fully combining the two methods of RTK and laser radar, it can effectively ensure that the lawn mower robot can always perform accurate position initialization, and effectively ensure the stable and reliable operation of the lawn mower robot.
[0045] In a specific application embodiment, Figure 2As shown, first, after the lawn mowing robot system is started, it determines whether the RTK positioning information at the current position is reliable. If the positioning information is reliable, then the positioning information in the current RTK coordinate system is recorded, that is, an origin position RTK positioning information is stored, recorded as Pr; if the RTK positioning information is unreliable, indicating that RTK positioning is not applicable in the current scene, then the positioning information in the RTK coordinate system is not saved or set to zero by default, and the subsequent positioning information will be provided by the laser radar sensor Lidar-SLAM throughout the process. At the same time, before the lawn mowing robot starts to move, the point cloud data from the first 10 frames of the laser radar (specific configuration can be based on actual needs) is collected, and a square area with a fixed side length λ is manually constructed with the current point as the center point of the rectangle as the origin mark of the current map construction coordinate system, which is the first origin mark. Then the value of the Z-axis direction of the point cloud in the area is differentiated and reset to highlight the mark point. When the mowing robot starts to move, it can obtain the point cloud and positioning information of the current position at the same time. After the mowing robot moves for 10s (the specific configuration can be based on actual needs), it will construct a square area with the current point as the center and a side length of λ as an auxiliary mark of the current position. Then, when the mowing robot completes the construction of the work area map around the edge of the work area, it can obtain two key information: a complete point cloud map with origin mark and auxiliary mark, and the real distance T between the origin mark and the auxiliary mark. The marked point cloud map is further processed into two dimensions to obtain a new map of the Mat matrix type. Finally, the pixels of the corresponding points of the two-dimensional map are filled according to the normalization of the value in the Z-axis direction of the point cloud to obtain the final two-dimensional image map to be saved, which is the prior map M1. At this point, the construction of the map is completed. The prior map M1 has rectangular marks (first origin mark, auxiliary mark), and the real distance T between the marked points can also be obtained based on the prior map.
[0046] Step S02. When the lawn mowing robot is restarted in the target working area, multi-frame point cloud data scanned by the laser radar is collected at the current position to construct a two-dimensional local image map, and a second origin mark is constructed in the local image map with the current position as the center to obtain a two-dimensional local image map with the second origin mark.
[0047] If the controlled mowing robot is restarted in the working area, a local image map needs to be constructed for the current position in order to initialize the initial position in combination with the previously constructed prior map. After the system is started, the mowing robot usually takes about 30 seconds (depending on the type of mowing robot) to complete the system self-check. During this time, the initialization algorithm first loads the prior map and collects 10 seconds (specific configuration can be based on actual needs) of lidar point cloud data to build the current local image map. At the same time, similar to step 1, a mark is constructed in the map based on the current position point as the second origin mark to form a local image map with a second origin mark.
[0048] Specifically, after the robot restarts and completes self-check and loads the prior map, after the local image map is constructed based on the collected multi-frame point cloud data, a starting point mark with a radius of r is constructed in the map with the current origin as the center as the second origin mark. The first origin mark and the second origin mark are of different types, which can be conducive to quickly distinguishing the two marks. If the radius of the above-mentioned second origin mark is configured too large, effective information will be lost, and if the radius is configured too small, it will be difficult to identify. Specifically, a suitable radius can be set according to the size of the actual application scene so that effective information will not be lost and it is easy to identify. After obtaining the local image map with the second origin mark in the above manner, further data conversion is performed to convert the 3D point cloud into a 2D image conversion, and finally a two-dimensional local image map M2 with the second origin mark is obtained. After the above steps, the following data can be obtained at this time: the prior map M1 (two-dimensional global map) with two-point marks, the real distance T between the two-point marks in the prior map M1, and the two-dimensional local image map M2 with the origin mark at the current position.
[0049] Step S03. Match and stitch the prior map with the currently obtained two-dimensional local image map, calculate the pixel difference between the first origin mark and the second origin mark in the stitched image, and map the current position point to the prior map based on the prior information between the first original mark and the auxiliary mark and the calculated pixel difference, thereby completing the position initialization of the lawn mower.
[0050] The key to initializing the initial position of the intelligent lawn mower robot after restarting is to solve the position of the current position of the lawn mower robot in the working area after the system restarts based on the origin of the prior map. After the prior map with two marking points is constructed in step S01, the prior information such as the real distance and pixel difference between the two marking points can be obtained based on the prior map. After the local image map with the origin mark is constructed after the lawn mower robot is restarted, the position of the lawn mower robot after restarting can be mapped to the prior map using the prior map and the prior information between the two marking points in the prior map, thereby completing the initialization of the initial position.
[0051] In this embodiment, the prior map is firstly spliced with the currently obtained two-dimensional local image map, and the steps include:
[0052] Step S301: perform key point detection and matching on the prior map and the currently obtained two-dimensional local image map to obtain a matching point cloud pair.
[0053] Specifically, a method based on two-dimensional feature matching such as SURF (Speeded Up Robust Features) algorithm can be used to realize key point detection between the prior map and the two-dimensional local image map. By extracting two-dimensional features of the prior map and the two-dimensional local image map, such as corner points, edge points, etc., a series of key points are obtained, and a descriptor is generated for each key point, such as SIFT descriptor, SURF (Speeded Up Robust Features) descriptor, ORB (Oriented FAST and Rotated BRIEF) descriptor, etc., and the descriptors of the key points are used to match between different images, and matching algorithms such as Nearest Neighbor Search and K-Nearest Neighbor Search can be used. Of course, other types of image feature matching algorithms can also be used for implementation, such as filtering algorithms for matching point pairs.
[0054] Furthermore, key point detection and matching are performed on the prior map and the currently obtained two-dimensional local image map, and the RANSAC algorithm is used to filter out incorrect matching point pairs, so as to finally obtain accurately matched point cloud pairs.
[0055] Step S302: Calculate the transformation matrix Mt between the prior map and the two-dimensional local image map based on the matched point cloud pairs.
[0056] Specifically, the transformation matrix is solved according to the well-matched matching point cloud to obtain the transformation matrix Mt from the two-dimensional local image map M2 to the prior map M1. The transformation matrix Mt is the matrix used to describe the transformation between the two-dimensional local image map M2 and the prior map M1, so as to realize the mapping of the points in the two-dimensional local image map M2 from the coordinate system of the two-dimensional local image map to the coordinate system of the prior map.
[0057] Since the present embodiment performs transformation in a two-dimensional space, the transformation matrix Mt can be specifically represented by a 3×3 homogeneous coordinate transformation matrix:
[0058]
[0059] Among them, θ represents the rotation angle, tx and ty represent the translation amounts in the x-axis direction and y-axis direction respectively.
[0060] Step S303: splice the priori map and the local image map according to the transformation matrix to obtain a spliced image.
[0061] According to the obtained transformation matrix Mt, the prior map M1 and the two-dimensional local image map M2 can be stitched, that is, unified into the same coordinate system, thereby obtaining a new image P, which has both the first origin mark and the second origin mark. This embodiment further uses tools such as OpenCV to detect and filter out the first origin mark and the second origin mark, and then solves to obtain the pixel difference D between the center pixel of the second origin mark area (current origin) and the center pixel of the first origin mark area (the origin of the prior map).
[0062] Further, according to the information of the first original mark and the auxiliary mark and the calculated pixel difference, the current position point is mapped to the prior map. The specific steps include:
[0063] Step S311. Calculate the real distance corresponding to a single pixel according to the real distance T between the first original mark and the auxiliary mark and the pixel difference K between the first origin mark and the auxiliary mark;
[0064] Step S312: Calculate the real distance Dr between the first origin mark and the second origin mark according to the pixel distance X between the first origin mark and the second origin mark and the real distance corresponding to a single pixel.
[0065] When the prior map M1 is constructed, the first origin mark and the auxiliary mark can obtain the real distance T between the two points. After the prior map M1 is generated, the pixel difference K between the first origin mark and the auxiliary mark can also be obtained, and the real distance corresponding to a single pixel can be further calculated. For example, the real distance corresponding to a single pixel can be calculated in the form of T / K. When the real distance corresponding to a single pixel is known, assuming that the pixel distance between the two origins (the first origin mark and the second origin mark) is X, the real distance Dr between the first origin mark and the second origin mark can be calculated based on the pixel distance X and the real distance corresponding to a single pixel. For example, the real distance Dr between the two can be calculated according to the formula Dr=X×(T / K). Finally, according to the real distance Dr between the first origin mark and the second origin mark, the current position point can be mapped to the corresponding real physical coordinates in the prior map, and the initialization of the initial position of the lawn mower robot after restarting is completed.
[0066] It can be understood that the actual distance corresponding to a single pixel and the calculation expression of the actual distance Dr can be optimized and adjusted on the above basis according to actual needs.
[0067] In this embodiment, when the lawn mower robot system is restarted, it also includes determining whether the RTK positioning information at the current position is reliable. If it is reliable, the origin position positioning information in the current RTK coordinate system is recorded and saved, so that the information obtained by both the RTK and the lidar sensor can be fully utilized as a priori information to realize the initialization of the initial position of the lawn mower robot under the priori map. The files that need to be saved in this embodiment include a binary file and a two-dimensional image map M1. The binary file includes the origin coordinates (x, y) and the true distance T. Saving in binary mode can further ensure information security, and the two-dimensional image is stored in PNG format. When judging the RTK signal, the origin coordinate information will be stored regardless of whether the RTK signal is stable. If the RTK positioning is reliable, the stored origin positioning information can be used directly. If the RTK positioning is unreliable, the origin coordinates will not be saved or will be stored in the form of (0,0) by default. Finally, the origin coordinates and the true distance T are input into the two-dimensional map M1 with the origin mark, and the current position P is finally determined based on the validity of the RTK positioning coordinates. c Is it derived from RTK positioning or initialization based on the prior map M1.
[0068] In a specific application embodiment, Figure 3As shown in the figure, when the controlled mowing robot restarts in the working area, it starts to initialize the initial position based on the prior map, and performs a system self-check after the system is started. The prior map is loaded during the system self-check. On the one hand, the reliability of the RTK positioning information is judged. If the RTK positioning is unreliable, the current position is set as an invalid parameter. If the RTK positioning is reliable, the origin coordinate Pr in the prior map is judged. If and only if Pr is not 0, the current position is calculated based on the origin of the prior map M1. That is, when the RTK positioning is reliable, the RTK positioning information is directly used for initialization. If the positioning is unreliable, the initialization is switched to the prior map M1. If the RTK signal is unreliable and initialized based on the prior map M1, first collect 10s (specific configuration can be made according to actual needs) of lidar point cloud data to build a local image map, and build a starting point marker based on the current origin radius r as the second origin marker, and obtain a two-dimensional local image map M2 after image conversion; use the SURF algorithm to detect and match key points on the prior map and the current image map respectively, and then use the RANSAC algorithm to filter out the wrong matching point pairs to obtain the point pairs with good matching, and solve the transformation matrix based on the good matching point cloud to obtain the transformation matrix M from M2 to M1 t, according to the obtained transformation matrix Mt, image splicing of M2 and M1 is performed to obtain a new image P, the first origin mark and the second origin mark in the image P are detected and filtered out, and the pixel difference between the first origin mark and the second origin mark area is solved and recorded as D. According to the real distance T between the first origin mark and the auxiliary mark and the pixel difference K, the real distance corresponding to a single pixel is calculated as T / K, and the pixel distance X between the two origins is calculated according to the real distance corresponding to a single pixel, and then the current position is mapped to the real physical coordinate P based on the origin of the prior map. m , so in fact, we will get the current position information P based on RTK g and the position coordinates P under the M1 prior map m , and finally by judging P g The validity of the current position P c The final assignment is performed to complete the initial position initialization of the intelligent lawn mowing robot. At this point, the initial position initialization of the intelligent lawn mowing robot is completed.
[0069] The present invention initializes the position of the mowing robot by combining a laser radar. In the process of constructing a priori map, an origin mark and an auxiliary mark are simultaneously constructed in the map to form a two-dimensional priori map with two marks. When the robot is restarted, a two-dimensional local image map with an origin mark is constructed, and then the two-dimensional priori map is matched and spliced with the two-dimensional local image map. The robot position is mapped to the priori map using the prior information marked in the two-dimensional priori map, forming a new position initialization method for the mowing robot, realizing fast and accurate initialization of the initial position of the mowing robot, and being able to convert the registration problem of the laser radar in three-dimensional space to two-dimensional space, avoiding the problem of excessive system resource consumption and low efficiency caused by the need to use an iterative matching method in three-dimensional space, and at the same time effectively avoiding the local optimal problem caused by directly using three-dimensional point clouds for global registration, and there is no need to rely on the positioning information of a GPS / RTK positioning device, so it can be applied to scenarios where the positioning accuracy of the GPS / RTK positioning device is unreliable or the positioning effect is poor due to visual interference, ensuring efficient and reliable operation of the robot.
[0070] The position initialization device of the intelligent lawn mowing robot in this embodiment includes:
[0071] A priori map generation module is used to control the mowing robot equipped with a laser radar to move around the boundary of the target working area, so as to construct a map of the mowing robot according to the point cloud data scanned by the laser radar, and during the operation of the mowing robot, first collect multiple frames of point cloud data scanned by the laser radar at the starting position, and construct a first origin mark of the current map with the starting position as the center, and then construct an auxiliary mark with the current position point as the center in the current map after running for a specified time, generate a point cloud map with the first origin mark and the auxiliary mark, and convert it into a two-dimensional map to be saved as a priori map;
[0072] A two-dimensional local map generation module is used to collect multi-frame point cloud data scanned by the laser radar at the current position point when the mowing robot restarts in the target working area to construct a two-dimensional local image map, and to construct a second origin mark in the local image map with the current position point as the center to obtain a two-dimensional local image map with the second origin mark;
[0073] The initialization module is used to match and splice the prior map with the currently obtained two-dimensional local image map, calculate the pixel difference between the first origin mark and the second origin mark in the spliced image, and map the current position point to the prior map based on the prior information between the first original mark and the auxiliary mark and the calculated pixel difference, thereby completing the position initialization of the lawn mower.
[0074] In this embodiment, the initialization module includes a splicing unit for splicing the prior map with the currently obtained two-dimensional local image map, and the splicing unit specifically includes:
[0075] The detection and matching subunit is used to detect and match key points of the prior map and the currently obtained two-dimensional local image map to obtain matching point cloud pairs;
[0076] A transformation matrix solving subunit, used for solving the transformation matrix between the prior map and the two-dimensional local image map according to the matched point cloud pairs;
[0077] The stitching subunit is used to stitch the prior map and the local image map according to the transformation matrix to obtain a stitched image.
[0078] In this embodiment, the initialization module further includes a mapping unit for mapping the current position point to the prior map according to the information of the first original mark and the auxiliary mark and the calculated pixel difference. The mapping unit specifically includes:
[0079] A first calculation unit, configured to calculate a real distance corresponding to a single pixel according to a real distance T between the first original mark and the auxiliary mark and a pixel difference K between the first origin mark and the auxiliary mark;
[0080] A second calculation unit, configured to calculate a real distance Dr between the first origin mark and the second origin mark according to a pixel distance X between the first origin mark and the second origin mark and a real distance corresponding to a single pixel;
[0081] The mapping subunit is used to map the current position point to the corresponding real physical coordinates in the priori map according to the real distance between the first origin mark and the second origin mark.
[0082] The position initialization device of the intelligent lawn mowing robot in this embodiment corresponds to the position initialization method of the intelligent lawn mowing robot described above, and will not be described in detail here.
[0083] The present embodiment also provides a lawn mowing robot, which is equipped with a laser radar. The lawn mowing robot includes a processor, a memory, a controller and an actuator. The memory is used to store computer programs. The controller is used to control the actuator to perform corresponding actions according to the output of the processor. The processor is used to receive point cloud data obtained by scanning the laser radar and execute the computer program to perform the above method.
[0084] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.
[0085] Those skilled in the art will appreciate that the above-mentioned embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0086] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for initializing the position of an intelligent lawn mowing robot, characterized in that the steps include: Step S01. Control the controlled lawn mower robot equipped with a laser radar to move around the boundary of the target working area, construct a map of the lawn mower robot according to the boundary information of the target working area and the point cloud data scanned by the laser radar, and during the operation of the controlled lawn mower robot, first collect the multi-frame point cloud data scanned by the laser radar at the starting position, construct a mark with the starting position as the center as the first origin mark of the current map, and after running for a specified time, construct another mark with the current position point as the center as an auxiliary mark, generate a point cloud map with the first origin mark and the auxiliary mark, and save it as a priori map after converting it into a two-dimensional map; Step S02. When the controlled mowing robot is restarted in the target working area, a two-dimensional local image map is constructed by collecting multi-frame point cloud data scanned by the laser radar at the current position point, and a mark is constructed in the local image map with the current position point as the center as the second origin mark, so as to obtain a two-dimensional local image map with the second origin mark; Step S03. Match and stitch the prior map with the currently obtained two-dimensional local image map, calculate the pixel difference between the first origin mark and the second origin mark in the stitched image, and map the current position point to the prior map based on the prior information between the first original mark and the auxiliary mark and the calculated pixel difference, so as to complete the position initialization of the lawn mower.
2. The method for initializing the position of the intelligent lawn mowing robot according to claim 1, characterized in that: When constructing an origin mark or an auxiliary mark, an area of a specified shape is constructed with the current position point as the center point as the corresponding mark, and the shapes corresponding to the first origin mark and the second origin mark are different.
3. The method for initializing the position of the intelligent lawn mowing robot according to claim 1, characterized in that: In step S01, converting the generated point cloud map with the first origin mark and the auxiliary mark into a two-dimensional map includes: two-dimensionalizing the generated point cloud map to obtain a Mat matrix type map, wherein the width and height of the two-dimensional map are obtained by the maximum and minimum values of the map in the X and Y axis directions, and the pixels of the corresponding points of the two-dimensional map are filled after normalizing according to the values in the Z axis direction of the point cloud to obtain the final prior map M1.
4. The method for initializing the position of the intelligent lawn mowing robot according to claim 1, characterized in that: In step S03, stitching the prior map with the currently obtained two-dimensional local image map includes: Performing key point detection and matching on the prior map and the currently obtained two-dimensional local image map to obtain a matching point cloud pair; Solving a transformation matrix between the prior map and the two-dimensional local image map according to the matched point cloud pairs; The priori map and the local image map are spliced according to the transformation matrix to obtain a spliced image.
5. The method for initializing the position of the intelligent lawn mowing robot according to claim 4, characterized in that: In the key point detection and matching of the prior map and the currently obtained two-dimensional local image map, a method based on two-dimensional feature matching is used to realize key point detection and matching between the prior map and the two-dimensional local image map, and the RANSAC algorithm is used to filter out erroneous matching point pairs, and finally a matched point cloud pair is obtained.
6. The method for initializing the position of the intelligent lawn mowing robot according to any one of claims 1 to 5, characterized in that: In step S03, mapping the current position point to the prior map according to the information of the first original mark and the auxiliary mark and the calculated pixel difference includes: Calculate the real distance corresponding to a single pixel according to the real distance T between the first original mark and the auxiliary mark and the pixel difference K between the first origin mark and the auxiliary mark; Calculate the real distance Dr between the first origin mark and the second origin mark according to the pixel distance X between the first origin mark and the second origin mark and the real distance corresponding to the single pixel; The current position point is mapped to the corresponding real physical coordinates in the priori map according to the real distance between the first origin mark and the second origin mark.
7. The method for initializing the position of the intelligent lawn mowing robot according to claim 6, characterized in that: The real distance corresponding to a single pixel is calculated according to the formula T / K, and the real distance between the first origin mark and the second origin mark is calculated according to the formula Dr=X×(T / K).
8. The method for initializing the position of an intelligent lawn mowing robot according to any one of claims 1 to 5, characterized in that: When the lawn mowing robot system is started, it also includes judging whether the RTK positioning information at the current position is reliable. If it is reliable, the origin position positioning information in the current RTK coordinate system is recorded and saved.
9. A position initialization device for an intelligent lawn mowing robot, characterized in that: include: A priori map generation module is used to control the controlled lawn mower robot equipped with a laser radar to move around the boundary of a target working area, to construct a map of the lawn mower robot according to the boundary information of the target working area and the point cloud data scanned by the laser radar, and to collect multi-frame point cloud data scanned by the laser radar at the starting position during the operation of the controlled lawn mower robot, to construct a mark with the starting position as the center as the first origin mark of the current map, and to construct a mark with the current position as the center as an auxiliary mark after running for a specified time, to generate a point cloud map with the first origin mark and the auxiliary mark, and to save it as a priori map after converting it into a two-dimensional map; A two-dimensional local map generation module is used to collect multi-frame point cloud data scanned by the laser radar at the current position point to construct a two-dimensional local image map when the mowing robot restarts in the target working area, and to construct a mark in the local image map with the current position point as the center as the second origin mark, so as to obtain a two-dimensional local image map with the second origin mark; An initialization module is used to match and splice the prior map with the currently obtained two-dimensional local image map, calculate the pixel difference between the first origin mark and the second origin mark in the spliced image, and map the current position point to the prior map based on the prior information between the first original mark and the auxiliary mark and the calculated pixel difference, so as to complete the position initialization of the lawn mower.
10. A lawn mower robot, the lawn mower robot being equipped with a laser radar, the lawn mower robot comprising a processor, a memory, a controller and an actuator, the memory being used to store a computer program, the controller being used to control the actuator to perform a corresponding action according to an output of the processor, characterized in that: The processor is used to receive point cloud data obtained by laser radar scanning, and execute the computer program to perform the method as claimed in any one of claims 1 to 8.
