Robot positioning method, device, lawn mowing robot and storage medium
By controlling the mowing robot to perform graphic code acquisition operations within the initial map and building a target map, the problem of degradation of positioning accuracy of the mowing robot in complex environments is solved, and higher positioning accuracy and mowing efficiency are achieved.
Patent Information
- Application Number
- CN202210862359.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-07-20
AI Technical Summary
The positioning accuracy of the mowing robot decreases when buildings and trees block satellite signals, radio interference, etc.
By obtaining the initial points and graphic codes in the initial map, the mowing robot is controlled to perform graphic code acquisition operations in the initial map, obtain the collected data, and build a target map for positioning.
The positioning accuracy of the mowing robot in complex environments is improved to ensure the effectiveness and coverage of mowing operations.
Smart Images

Figure CN115191213B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a robot positioning method, device, lawn mowing robot and storage medium. Background Art
[0002] Mowing robots are widely used in maintaining lawns in home gardens and mowing large lawns. Mowing robots integrate technologies such as motion control, multi-sensor fusion, and path planning. In order to control the mowing robot to achieve mowing operations, it is necessary to plan the mowing path of the mowing robot so that it can completely cover all operating areas.
[0003] At present, Simultaneous Localization And Mapping (SLAM) technology is often used to solve the problems of positioning and environmental map construction of lawn mowing robots. SLAM technology can estimate the position information of the lawn mowing robot in the surrounding environment based on the position and posture information of the lawn mowing robot in the world coordinate system. However, when there are buildings or trees blocking satellite signals or radio interference at the location of the lawn mowing robot, the positioning accuracy of the lawn mowing robot will be reduced. Summary of the invention
[0004] The embodiments of the present application provide a robot positioning method, device, lawn mowing robot and storage medium, which can improve the positioning accuracy of the lawn mowing robot.
[0005] In a first aspect, an embodiment of the present application provides a robot positioning method, comprising:
[0006] Acquire an initial map including a plurality of initial points, wherein the initial map is generated according to the graphic code collected by the lawn mowing robot, and each of the initial points corresponds to one of the graphic codes;
[0007] Controlling the mowing robot to perform a graphic code collection operation in the initial map to obtain collection data corresponding to the graphic code collection operation, wherein the collection data includes a plurality of collection points and collection posture information corresponding to each of the collection points;
[0008] A target map is constructed according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map, so as to locate the lawn mowing robot according to the target map.
[0009] Optionally, in some embodiments, constructing a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map includes:
[0010] According to the graphic code identifier corresponding to the collection point, obtaining the initial posture information corresponding to the graphic code identifier;
[0011] A target map is constructed according to the initial posture information, the collected posture information and the initial map.
[0012] Optionally, in some embodiments, constructing a target map according to the initial posture information, the collected posture information and the initial map includes:
[0013] Extracting a first initial posture corresponding to the graphic code and a second initial posture corresponding to the lawn mowing robot from the initial posture information;
[0014] Extracting a first collected posture corresponding to the graphic code and a second collected posture corresponding to the lawn mowing robot from the collected posture information;
[0015] Based on the first initial posture, the second initial posture and the first collected posture, estimating the current posture of the lawn mowing robot;
[0016] A posture error between the second acquired posture and the current posture is calculated, and a target map is constructed according to the posture error.
[0017] Optionally, in some embodiments, estimating the current posture of the lawn mowing robot based on the first initial posture, the second initial posture and the first collected posture includes:
[0018] determining the camera coordinates when acquiring the graphic code, and;
[0019] Determine the world coordinates corresponding to the lawn mowing robot;
[0020] The current posture of the lawn mowing robot is estimated according to the transformation extrinsic parameters between the camera coordinates and the world coordinates, the first initial posture, the second initial posture and the first collected posture.
[0021] Optionally, in some embodiments, constructing a target map according to the posture error includes:
[0022] Performing nonlinear optimization on the posture error;
[0023] The initial map is updated according to the optimized posture error to obtain a target map.
[0024] Optionally, in some embodiments, before obtaining the initial map including the plurality of initial points, the method further includes:
[0025] Set multiple graphic codes in a preset mowing area;
[0026] Control the mowing robot to collect graphic codes within the field of view, and obtain an initial point corresponding to each graphic code;
[0027] The initial point and the posture corresponding to the graphic code are bound to a map node information, and an initial map is generated based on the map node information.
[0028] Optionally, in some embodiments, the controlling the lawn mowing robot to collect graphic codes within a field of view to obtain an initial point corresponding to each graphic code includes:
[0029] Control the mowing robot to identify the graphic code within the field of view;
[0030] The pose information and the graphic code identifier of the graphic code in the camera coordinate system are extracted, and the identified graphic code is marked as a valid graphic code.
[0031] In a second aspect, an embodiment of the present application provides a robot positioning device, comprising:
[0032] An acquisition module, used to acquire an initial map including a plurality of initial points, wherein the initial map is generated according to the graphic code collected by the lawn mowing robot, and each initial point corresponds to one graphic code;
[0033] A collection module, used for controlling the mowing robot to perform a graphic code collection operation in the initial map, and obtaining collection data corresponding to the graphic code collection operation, wherein the collection data includes a plurality of collection points and collection posture information corresponding to each of the collection points;
[0034] A construction module, used to construct a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map;
[0035] A positioning module is used to position the lawn mowing robot according to the target map.
[0036] In the embodiment of the present application, after obtaining an initial map including a plurality of initial points, the initial map is generated according to the graphic codes collected by the mowing robot, each of the initial points corresponds to a graphic code, and the mowing robot is controlled to perform a graphic code collection operation within the initial map to obtain collection data corresponding to the graphic code collection operation, wherein the collection data includes a plurality of collection points and collection posture information corresponding to each of the collection points. Finally, a target map is constructed according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map, so as to locate the mowing robot according to the target map. In the robot positioning scheme provided in the present application, an initial map is generated in advance according to the graphic codes collected by the mowing robot, and the mowing robot is controlled to perform a graphic code collection operation in the initial map. Finally, a high-precision target map is constructed according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map, so as to subsequently locate the mowing robot according to the target map. Thus, the positioning accuracy of the mowing robot can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1a is a schematic diagram of a scenario of a robot positioning method provided in an embodiment of the present application;
[0039] Figure 1b is a flow chart of a robot positioning method provided in an embodiment of the present application;
[0040] Figure 2 is a schematic diagram of the structure of a robot positioning device provided in an embodiment of the present application;
[0041] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0043] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, connection can be used for both fixing and circuit connection.
[0044] It should be understood that the orientation or position relationship indicated by terms such as "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0045] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0046] Embodiments of the present application provide a robot positioning method, device, lawn mowing robot and storage medium.
[0047] The robot positioning device can be integrated in the microcontroller unit (MCU) of the mowing robot, and can also be integrated in the intelligent terminal or server. The MCU is also called a single chip microcomputer or a single chip microcomputer. It is a chip-level computer that appropriately reduces the frequency and specifications of the central processing unit (CPU), and integrates memory, timer, USB, analog-to-digital conversion / digital-to-analog conversion, UART, PLC, DMA and other peripheral interfaces to make different combination controls for different application occasions. The mowing robot can walk automatically, prevent collisions, automatically return to charge within the range, have safety detection and battery power detection, and have a certain climbing ability. It is especially suitable for lawn mowing and maintenance in places such as home gardens and public green spaces. Its characteristics are: automatic mowing, cleaning grass clippings, automatic rain shelter, automatic charging, automatic obstacle avoidance, small size, electronic virtual fence, network control, etc.
[0048] The terminal may be a smart phone, tablet computer, laptop computer, desktop computer, smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication. The server may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. This application does not limit this.
[0049] For example, see Figure 1aThe present application provides a mowing system, including a mowing robot 10, a server 20 and a user device 30 that are connected to each other by communication, wherein the mowing robot 10 is equipped with a visual sensor P, and the visual sensor P is located behind the ultrasonic sensor, thereby avoiding blocking the ultrasonic sensor, which may affect the obstacle avoidance function of the subsequent mowing robot 10. The user may control the movement of the mowing robot 10 through the user device 30 in advance, set the mowing area based on the movement trajectory, and synchronize the data corresponding to the mowing area to the mowing robot 10 and the server 20. In addition, in the mowing area, multiple graphic codes may be set in advance. After setting the graphic code, the mowing robot is controlled to collect the position, posture and graphic code identifier of the set graphic code. Subsequently, the mowing robot 10 is controlled to perform the graphic code collection operation in the initial map. Finally, a target map is constructed according to the graphic code identifier corresponding to the collection point, the collected posture information and the initial map, so as to locate the mowing robot 10 according to the target map.
[0050] The robot positioning solution provided in the present application generates an initial map in advance based on the graphic codes collected by the mowing robot, and controls the mowing robot to perform graphic code collection operations in the initial map. Finally, a high-precision target map is constructed based on the graphic code identification corresponding to the collection point, the collection posture information and the initial map, so that the mowing robot can be positioned according to the target map later, thereby improving the positioning accuracy of the mowing robot.
[0051] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.
[0052] A robot positioning method comprises: obtaining an initial map including a plurality of initial points, controlling a lawn mowing robot to perform a graphic code collection operation in the initial map, obtaining collection data corresponding to the graphic code collection operation, constructing a target map according to the graphic code identifiers corresponding to the collection points, the collection posture information and the initial map, so as to position the lawn mowing robot according to the target map.
[0053] See also Figure 1b , Figure 1b A schematic diagram of a process flow of a robot positioning method provided in an embodiment of the present application. The specific process flow of the robot positioning method may be as follows:
[0054] 101. Obtain an initial map including multiple initial points.
[0055] Among them, the initial map is generated according to the graphic code collected by the mowing robot, and each initial point corresponds to a graphic code. The graphic code is a black and white graphic that records data symbol information distributed in a preset area according to a certain rule using a certain specific geometric figure; in the code compilation, the concept of "0" and "1" bit streams that constitute the internal logic basis of the computer is cleverly used, and several geometric shapes corresponding to binary are used to represent textual numerical information, which is automatically read by an image input device or an optoelectronic scanning device to realize automatic information processing. The graphic code can be an AprilTag QR code, an ArUco QR code, an ARTag QR code, or a TopoTag QR code. Optionally, in some embodiments, the graphic code of the present application is an AprilTag QR code. AprilTag QR code is widely used in target tracking, augmented reality and other fields because of its good robustness to rotation, illumination, and blur.
[0056] Optionally, in some embodiments, multiple AprilTag QR codes may be pre-set in the mowing area, and then the mowing robot is controlled to collect the QR codes within its field of view to generate an initial map, that is, the step of "obtaining an initial map containing multiple initial points" may specifically include:
[0057] (11) Setting a plurality of graphic codes in a preset mowing area;
[0058] (12) Controlling the mowing robot to collect graphic codes within the field of view and obtain the initial point corresponding to each graphic code;
[0059] (13) Bind the initial point and the posture corresponding to the graphic code to a map node information, and generate an initial map based on the map node information.
[0060] For example, the mature Apriltag QR code recognition technology can be used to identify the position and posture of the QR code in the current camera coordinate system. The specific principle is as follows:
[0061] 1. Detect line segments
[0062] Calculate the gradient magnitude and direction at each pixel;
[0063] Using clustering algorithms, these pixels are clustered into a component with similar gradient direction and magnitude;
[0064] Using the weighted least squares method, the weight of each point is the intensity of the gradient at that point, and the above components are fitted into line segments;
[0065] 2. Detect rectangles (based on depth-first search)
[0066] Depth 1: consider all line segments;
[0067] Depth 2-4: Consider segments that are close enough to the end of the previous segment and that follow a counterclockwise direction.
[0068] 3. Homography transformation and extrinsic parameter estimation
[0069] Due to the relationship between world coordinates and image coordinates, they can be linked together through a homography matrix H (homography), as follows:
[0070]
[0071] Among them, s represents the depth information, [u, v, 1] represents the image coordinate system, [x w ,y w , 1] T Represents Z w = 0, after transforming the above matrix and eliminating the depth information s, we get:
[0072]
[0073] Finally, a matrix solution problem of Ah=0 is generated. According to the four corner points extracted from the image coordinate system of the AprilTag two-dimensional code and the correspondence with the four points assumed in the world coordinate system, four point pairs are formed, and then the direct linear method is used to solve the linear equations.
[0074] After obtaining the homography matrix H, the camera intrinsic parameters and the physical size of the AprilTag QR code are also required. Based on this, the rotation matrix and translation matrix that transform from the world coordinate system to the camera coordinate system are solved, that is, the camera's extrinsic parameter matrix. The solution process is not the focus of this application and will not be described here.
[0075] 3. Decoding content
[0076] Two threshold models are established (above the threshold, it is considered "1", and below the threshold, it is considered "0"), one based on the spatial variation of the "black" pixel intensity, and the other based on the spatial variation of the "white" pixel intensity:
[0077] I(x,y)=Ax+Bxy+Cy+D
[0078] The model has four parameters and can be solved by least squares regression. The final threshold value is obtained by the average value of the two models' predictions. Different code types are obtained by decoding labels with different black and white blocks. The decoded code types are compared with the code type library stored locally to eliminate the interference of other code types and determine whether it is the correct QR code.
[0079] 4. Solve the pose
[0080] In this process, the position of the camera in the world coordinate system and the position of the QR code in the camera coordinate system can be estimated according to the rotation matrix and the translation matrix from the world coordinate system to the camera coordinate system. That is, optionally, in some embodiments, the step of "controlling the mowing robot to collect graphic codes within the field of view to obtain the initial point corresponding to each graphic code" can specifically include:
[0081] (21) Controlling the lawn mowing robot to recognize graphic codes within its field of view;
[0082] (22) Extract the pose information and graphic code identifier of the graphic code in the camera coordinate system, and mark the identified graphic code as a valid graphic code.
[0083] 102. Control the mowing robot to perform a graphic code collection operation in the initial map to obtain collection data corresponding to the graphic code collection operation.
[0084] Among them, the collected data includes multiple collection points and the collection posture information corresponding to each collection point. For the convenience of description, the graphic code collection operation for generating the initial map is called the first collection, and the graphic code collection operation for controlling the lawn mowing robot to perform in the initial map is called the nth collection, where n is an integer greater than 1. Therefore, it can be seen that as the number of collections increases, the accumulated error of the inertial detection unit becomes larger, that is, the error corresponding to the nth collection operation is greater than the error of the first collection. Therefore, the data collected for the first time can be used to correct the data collected for the nth time later.
[0085] 103. Construct a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map, so as to locate the lawn mowing robot according to the target map.
[0086] When the mowing robot repeatedly moves to the effective QR code, the QR code identifier corresponding to the current QR code and the relative position and posture of the QR code can be extracted, and the relative position and posture when the QR code is obtained and the world coordinate position and posture corresponding to the mowing robot are obtained by using the QR code identifier. Subsequently, a target map is constructed according to the acquired posture and the initial map. That is, optionally, in some embodiments, the step of "constructing a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map, so as to locate the mowing robot according to the target map" can specifically include:
[0087] (31) According to the graphic code identifier corresponding to the collection point, obtain the initial posture information corresponding to the graphic code identifier;
[0088] (32) Construct a target map based on the initial posture information, the collected posture information and the initial map.
[0089] For example, for the result of repeated observation of a single QR code, the current posture of the mowing robot can be estimated by using the relative posture of the QR code in the camera coordinate system and the posture of the mowing robot in the world coordinate system. Then, based on the current posture, a target map is constructed. That is, optionally, the step of "constructing a target map according to the initial posture information, the collected posture information and the initial map" can specifically include:
[0090] (41) extracting a first initial posture corresponding to the graphic code and a second initial posture corresponding to the lawn mowing robot from the initial posture information;
[0091] (42) extracting a first collected posture corresponding to the graphic code and a second collected posture corresponding to the lawn mowing robot from the collected posture information;
[0092] (43) estimating a current posture of the lawn mowing robot based on the first initial posture, the second initial posture, and the first collected posture;
[0093] (44) Calculate the posture error between the second acquired posture and the current posture, and construct a target map based on the posture error.
[0094] Specifically, the coordinate system transformation relationship can be established through the relative posture of the QR code in the camera coordinate system (the first initial posture and the first collected posture), the relative posture of the mowing robot in the world coordinate system (the second initial posture), and the transformation external parameters between the camera coordinate system and the central coordinate system of the mowing robot. Thus, the current posture of the mowing robot is estimated, and there is an error term between the current posture and the second collected posture, that is, the error term Terror=the second collected posture-the current posture, that is, optionally, in some embodiments, the step of "estimating the current posture of the mowing robot based on the first initial posture, the second initial posture and the first collected posture" can specifically include:
[0095] (51) determining the camera coordinates when collecting the graphic code, and determining the world coordinates corresponding to the lawn mowing robot;
[0096] (52) Estimate the current posture of the lawn mowing robot according to the transformation external parameters between the camera coordinates and the world coordinates, the first initial posture, the second initial posture and the first collected posture.
[0097] After obtaining multiple error terms, a least squares problem is constructed, and then the error terms are nonlinearly optimized to construct a target map. That is, optionally, in some embodiments, the step of "constructing a target map according to the posture error" may specifically include:
[0098] (61) Perform nonlinear optimization on the posture error;
[0099] (62) The initial map is updated according to the optimized pose error to obtain the target map.
[0100] Among them, a nonlinear optimization algorithm or a nonlinear optimization library can be used to perform nonlinear optimization on the posture error. For example, the Gauss-Newton algorithm can be used to perform nonlinear optimization on the posture error, or the LM algorithm can be used to perform nonlinear optimization on the posture error. For example, the ceres nonlinear optimization library can be used to perform nonlinear optimization on the posture error. The specific selection can be made according to the actual situation.
[0101] It should be noted that the nonlinear optimization of the pose error is actually to optimize the pose so that the pose error is as small as possible. Specifically, the coordinate function and loss function in the ceres nonlinear optimization library can be used to optimize the pose to reduce the pose error. Finally, the nonlinear algorithm can be used in the spatial name of the nonlinear optimization library to update the initial map and finally obtain the target map.
[0102] After obtaining the target map, in response to the positioning operation for the lawn mowing robot, the lawn mowing robot is positioned according to the target map, thereby completing the robot positioning process of the present application.
[0103] After the embodiment of the present application obtains an initial map containing multiple initial points, the initial map is generated according to the graphic codes collected by the mowing robot, each initial point corresponds to one of the graphic codes, and the mowing robot is controlled to perform a graphic code collection operation within the initial map to obtain collection data corresponding to the graphic code collection operation, the collection data including multiple collection points and collection posture information corresponding to each collection point, and finally, a target map is constructed according to the graphic code identifiers corresponding to the collection points, the collection posture information and the initial map, so as to position the mowing robot according to the target map. In the robot positioning solution provided in the present application, an initial map is generated in advance according to the graphic codes collected by the mowing robot, and the mowing robot is controlled to perform a graphic code collection operation in the initial map, and finally, a high-precision target map is constructed according to the graphic code identifiers corresponding to the collection points, the collection posture information and the initial map, so as to subsequently position the mowing robot according to the target map, thereby improving the positioning accuracy of the mowing robot.
[0104] See also Figure 2 , Figure 2 The schematic diagram of the structure of the robot positioning device provided in the embodiment of the present application, wherein the robot positioning device may include an acquisition module 201, a collection module 202, a construction module 203 and a positioning module 204, which may be specifically as follows:
[0105] The acquisition module 201 is used to acquire a preset mowing area.
[0106] The initial map is generated according to the graphic codes collected by the mowing robot, and each initial point corresponds to a graphic code. Optionally, in some embodiments, multiple AprilTag QR codes can be set in advance in the mowing area, and then the mowing robot is controlled to collect the QR codes within its field of view to generate the initial map, that is, optionally, in some embodiments, the acquisition module 201 can be specifically used to: set multiple graphic codes in the preset mowing area; control the mowing robot to collect the graphic codes within the field of view to obtain the initial point corresponding to each graphic code; bind the initial point and the posture corresponding to the graphic code to a map node information, and generate the initial map based on the map node information.
[0107] The collection module 202 is used to control the mowing robot to perform a graphic code collection operation in the initial map, and obtain collection data corresponding to the graphic code collection operation.
[0108] The collected data includes multiple collection points and collection posture information corresponding to each collection point.
[0109] The construction module 203 is used to construct a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map.
[0110] When the mowing robot repeatedly moves to the effective QR code, the QR code identifier corresponding to the current QR code and the relative position and posture of the QR code can be extracted, and the relative position and posture when the QR code is obtained and the world coordinate position and posture corresponding to the mowing robot are obtained by using the QR code identifier. Then, according to the obtained position and posture and the initial map, the target map is constructed. That is, optionally, in some embodiments, the construction module 203 may include:
[0111] An acquisition unit, used to acquire initial posture information corresponding to the graphic code identifier according to the graphic code identifier corresponding to the collection point;
[0112] The construction unit is used to construct a target map according to the initial posture information, the collected posture information and the initial map.
[0113] Optionally, in some embodiments, the construction unit may specifically include:
[0114] An extraction subunit, used to extract a first initial posture corresponding to the graphic code and a second initial posture corresponding to the mowing robot from the initial posture information, and to extract a first acquisition posture corresponding to the graphic code and a second acquisition posture corresponding to the mowing robot from the acquisition posture information;
[0115] An estimation subunit, used for estimating a current posture of the mowing robot based on the first initial posture, the second initial posture and the first collected posture;
[0116] A calculation subunit, used to calculate a posture error between the second acquired posture and the current posture;
[0117] The construction subunit is used to construct the target map based on the pose error.
[0118] Optionally, in some embodiments, the estimation subunit can be specifically used to: determine the camera coordinates when collecting graphic codes, and determine the world coordinates corresponding to the lawn mowing robot; estimate the current pose of the lawn mowing robot based on the transformation external parameters between the camera coordinates and the world coordinates, the first initial pose, the second initial pose and the first collected pose.
[0119] Optionally, in some embodiments, the construction subunit may be specifically used to: perform nonlinear optimization on the posture error; and update the initial map according to the optimized posture error to obtain the target map.
[0120] The positioning module 204 is used to position the lawn mowing robot according to the target map.
[0121] After the acquisition module 201 of the robot positioning device of the embodiment of the present application acquires the initial map including multiple initial points, the initial map is generated according to the graphic codes collected by the mowing robot, and each initial point corresponds to one of the graphic codes. The acquisition module 202 controls the mowing robot to perform the graphic code acquisition operation in the initial map to obtain the acquisition data corresponding to the graphic code acquisition operation, and the acquisition data includes multiple acquisition points and the acquisition posture information corresponding to each acquisition point. Finally, the construction module 203 constructs the target map according to the graphic code identifier corresponding to the acquisition point, the acquisition posture information and the initial map, so that the positioning module 204 can locate the mowing robot according to the target map. In the robot positioning solution provided in the present application, the initial map is generated in advance according to the graphic code collected by the mowing robot, and the mowing robot is controlled to perform the graphic code acquisition operation in the initial map. Finally, according to the graphic code identifier corresponding to the acquisition point, the acquisition posture information and the initial map, a high-precision target map is constructed, so that the mowing robot can be positioned according to the target map later. Thus, the positioning accuracy of the mowing robot can be improved.
[0122] In addition, the present application also provides a lawn mowing robot. Figure 3 As shown, it shows a schematic diagram of the structure of the lawn mowing robot involved in the embodiment of the present application, specifically:
[0123] The lawn mowing robot may include components such as a control module 301, a travel mechanism 302, a cutting module 303, and a power supply 304. Those skilled in the art will appreciate that Figure 3 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0124] The control module 301 is the control center of the lawn mower robot. The control module 301 may specifically include components such as a central processing unit (CPU), a memory, an input / output port, a system bus, a timer / counter, a digital-to-analog converter, and an analog-to-digital converter. The CPU executes various functions of the lawn mower robot and processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory; preferably, the CPU may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the CPU.
[0125] The memory can be used to store software programs and modules. The CPU executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory may also include a memory controller to provide the CPU with access to the memory.
[0126] The traveling mechanism 302 is electrically connected to the control module 301 and is used to respond to the control signal transmitted by the control module 301 to adjust the traveling speed and traveling direction of the lawn mower robot, thereby realizing the self-moving function of the lawn mower robot.
[0127] The cutting module 303 is electrically connected to the control module 301 and is used to respond to the control signal transmitted by the control module to adjust the height and rotation speed of the cutting disc to achieve mowing operation.
[0128] The power supply 304 can be logically connected to the control module 301 through a power management system, so as to realize functions such as managing charging, discharging, and power consumption management through the power management system. The power supply 304 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0129] Although not shown, the lawn mowing robot may also include a communication module, a sensor module, a prompt module, etc., which will not be described in detail here.
[0130] The communication module is used to receive and send signals during the process of sending and receiving information. By establishing a communication connection with the user equipment, base station or server, the signal sending and receiving between the user equipment, base station or server is realized.
[0131] The sensor module is used to collect internal environment information or external environment information, and feed back the collected environmental data to the control module for decision-making, so as to realize the precise positioning and intelligent obstacle avoidance function of the lawn mowing robot. In the embodiment of the present application, the sensor module includes at least a visual sensor for collecting graphic codes in the working environment. Optionally, the sensor module may also include: an ultrasonic sensor, an infrared sensor, a collision sensor, a rain sensor, a lidar sensor, an inertial measurement unit, a wheel speed meter, a position sensor and other sensors, without limitation.
[0132] The prompt module is used to prompt the user of the current working status of the lawn mower robot. In this solution, the prompt module includes but is not limited to indicator lights, buzzers, etc. For example, the lawn mower robot can prompt the user of the current power status, motor working status, sensor working status, etc. through indicator lights. For another example, when the lawn mower robot is detected to be faulty or stolen, an alarm prompt can be implemented through a buzzer.
[0133] Specifically in this embodiment, the processor in the control module 301 will load the executable files corresponding to the processes of one or more application programs into the memory according to the following instructions, and the processor will run the application programs stored in the memory to implement various functions, as follows:
[0134] An initial map containing multiple initial points is obtained, and the lawn mowing robot is controlled to perform a graphic code acquisition operation within the initial map to obtain acquisition data corresponding to the graphic code acquisition operation. A target map is constructed according to the graphic code identifier corresponding to the acquisition point, the acquisition posture information and the initial map, so as to locate the lawn mowing robot according to the target map.
[0135] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0136] After the embodiment of the present application obtains an initial map containing multiple initial points, the initial map is generated according to the graphic codes collected by the mowing robot, each initial point corresponds to one of the graphic codes, and the mowing robot is controlled to perform a graphic code collection operation within the initial map to obtain collection data corresponding to the graphic code collection operation, the collection data including multiple collection points and collection posture information corresponding to each collection point, and finally, a target map is constructed according to the graphic code identifiers corresponding to the collection points, the collection posture information and the initial map, so as to position the mowing robot according to the target map. In the robot positioning solution provided in the present application, an initial map is generated in advance according to the graphic codes collected by the mowing robot, and the mowing robot is controlled to perform a graphic code collection operation in the initial map, and finally, a high-precision target map is constructed according to the graphic code identifiers corresponding to the collection points, the collection posture information and the initial map, so as to subsequently position the mowing robot according to the target map, thereby improving the positioning accuracy of the mowing robot.
[0137] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0138] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the robot positioning methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0139] An initial map containing multiple initial points is obtained, and the lawn mowing robot is controlled to perform a graphic code acquisition operation within the initial map to obtain acquisition data corresponding to the graphic code acquisition operation. A target map is constructed according to the graphic code identifier corresponding to the acquisition point, the acquisition posture information and the initial map, so as to locate the lawn mowing robot according to the target map.
[0140] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0141] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0142] Since the instructions stored in the storage medium can execute the steps in any robot positioning method provided in the embodiments of the present application, the beneficial effects that can be achieved by any robot positioning method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0143] The above is a detailed introduction to a robot positioning method, device, lawn mowing robot and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A robot positioning method, characterized in that: include: Acquire an initial map including a plurality of initial points, wherein the initial map is generated according to the graphic code collected by the lawn mowing robot, and each of the initial points corresponds to one of the graphic codes; Controlling the mowing robot to perform a graphic code collection operation in the initial map to obtain collection data corresponding to the graphic code collection operation, wherein the collection data includes a plurality of collection points and collection posture information corresponding to each of the collection points; Constructing a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map, so as to locate the lawn mowing robot according to the target map; The step of constructing a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map includes: obtaining the initial posture information corresponding to the graphic code identifier according to the graphic code identifier corresponding to the collection point; and constructing a target map according to the initial posture information, the collection posture information and the initial map; The method of constructing a target map based on the initial posture information, the collected posture information and the initial map includes: extracting a first initial posture corresponding to the graphic code and a second initial posture corresponding to the lawn mowing robot from the initial posture information; extracting a first collected posture corresponding to the graphic code and a second collected posture corresponding to the lawn mowing robot from the collected posture information; estimating a current posture of the lawn mowing robot based on the first initial posture, the second initial posture and the first collected posture; calculating a posture error between the second collected posture and the current posture, and constructing a target map based on the posture error.
2. The method according to claim 1, characterized in that The estimating the current posture of the lawn mowing robot based on the first initial posture, the second initial posture and the first collected posture includes: determining the camera coordinates when acquiring the graphic code, and; Determine the world coordinates corresponding to the lawn mowing robot; The current posture of the lawn mowing robot is estimated according to the transformation extrinsic parameters between the camera coordinates and the world coordinates, the first initial posture, the second initial posture and the first collected posture.
3. The method according to claim 1, characterized in that The step of constructing a target map according to the position and posture error comprises: Performing nonlinear optimization on the posture error; The initial map is updated according to the optimized posture error to obtain a target map.
4. The method according to any one of claims 1 to 3, characterized in that: Before obtaining the initial map including the plurality of initial points, the method further includes: Set multiple graphic codes in a preset mowing area; Control the mowing robot to collect graphic codes within the field of view, and obtain an initial point corresponding to each graphic code; The initial point and the posture corresponding to the graphic code are bound to a map node information, and an initial map is generated based on the map node information.
5. The method according to claim 4, characterized in that The controlling the lawn mowing robot to collect graphic codes within the field of view to obtain an initial point corresponding to each graphic code includes: Control the mowing robot to identify the graphic code within the field of view; The pose information and the graphic code identifier of the graphic code in the camera coordinate system are extracted, and the identified graphic code is marked as a valid graphic code.
6. A robot positioning device, characterized in that: include: An acquisition module, used to acquire an initial map including a plurality of initial points, wherein the initial map is generated according to the graphic code collected by the lawn mowing robot, and each initial point corresponds to one graphic code; A collection module, used for controlling the mowing robot to perform a graphic code collection operation in the initial map, and obtaining collection data corresponding to the graphic code collection operation, wherein the collection data includes a plurality of collection points and collection posture information corresponding to each of the collection points; A construction module, used to construct a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map; A positioning module, used for positioning the lawn mowing robot according to the target map; The step of constructing a target map according to the graphic code identifier corresponding to the collection point, the collection posture information and the initial map includes: obtaining the initial posture information corresponding to the graphic code identifier according to the graphic code identifier corresponding to the collection point; and constructing a target map according to the initial posture information, the collection posture information and the initial map; The method of constructing a target map based on the initial posture information, the collected posture information and the initial map includes: extracting a first initial posture corresponding to the graphic code and a second initial posture corresponding to the lawn mowing robot from the initial posture information; extracting a first collected posture corresponding to the graphic code and a second collected posture corresponding to the lawn mowing robot from the collected posture information; estimating a current posture of the lawn mowing robot based on the first initial posture, the second initial posture and the first collected posture; calculating a posture error between the second collected posture and the current posture, and constructing a target map based on the posture error.
7. A lawn mowing 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 program, the steps of the robot positioning method according to any one of claims 1 to 5 are implemented.
8. A storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the steps of the robot positioning method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Indoor robot positioning method, device and system based on two-dimensional codes and laser
CN108363386A
Mowing robot with UWB positioning
CN110972679A