Robot and Its Mapping Method, Device and Storage Medium
By setting positioning identifiers in the robot work scenario, generating a loop pose map and optimizing the pose, the problem of environmental information mismatch in robot map construction is solved, the positioning accuracy and navigation reliability are improved, and the map reconstruction frequency is reduced.
Patent Information
- Application Number
- CN202210208099.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-03-03
AI Technical Summary
In the prior art, when the robot builds the map, the environment information does not match the map information or the matching accuracy is insufficient, resulting in unreliable positioning navigation or frequent rebuilding of maps, affecting the user experience.
Set a positioning mark in the robot working scene, obtain keyframes through the sensing device and determine the robot position pose, combine the positioning mark with the positioning mark to generate a loop position pose map, and optimize the positioning mark of the robot position and positioning mark through the graph optimization method.
The position accuracy of the robot positioning and positioning marks corresponding to the keyframe is improved, the map reconstruction frequency is reduced, and the robot's reliable positioning and navigation is ensured.
Smart Images

Figure CN114739382B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of robots, and particularly relates to a robot, a mapping method and device thereof, and a storage medium. Background Art
[0002] Before a robot navigates, it usually constructs a scene map in advance. For example, current mobile service robots use two-dimensional laser SLAM (simultaneous localization and mapping in English, and synchronous localization and mapping in Chinese) to construct a scene map. During the navigation process of the robot, the laser sensor of the robot senses the environmental information around the robot and locates according to the environmental information and the constructed map, so that the robot can determine its position on the map.
[0003] If possible, after the mapping process of the map is completed, the actual usage scenario often changes. Especially in some complex scenarios, including offices, shopping malls, factories, etc., there are often things like sundries or item movements in these scenarios. Or, in scenarios with few scene features, including open scenarios or long corridor scenarios. In these scenarios, the environmental information collected by the robot may not match the information on the constructed map, or the matching accuracy is not high. As a result, the robot cannot reliably complete positioning and navigation, or needs to frequently map the scenario, which is not conducive to improving the user experience. Summary of the Invention
[0004] In view of this, embodiments of this application provide a robot, a mapping method and device thereof, and a storage medium to solve the problem in the prior art that during mapping, the environmental information may not match the information on the map, or the matching accuracy is insufficient, resulting in the robot being unable to reliably complete positioning and navigation, or needing to frequently map.
[0005] The first aspect of the embodiments of this application provides a mapping method for a robot, where positioning identifiers are set in the scenario where the robot is located, and the method includes:
[0006] During the movement of the robot, obtain key frames through a sensing device, and determine the robot pose corresponding to the key frames;
[0007] When the key frames include positioning identifiers, determine the pose of the positioning identifiers according to the image of the positioning identifiers in the key frames and in combination with the robot pose corresponding to the key frames;
[0008] Use the robot pose corresponding to the key frames and the pose of the positioning identifiers as nodes, and use the relative pose relationship between the key frames and the relative pose relationship between the positioning identifiers and the robot pose corresponding to the key frames as edges to generate a pose graph including loops;
[0009] Optimize the robot pose corresponding to the key frame and the pose of the positioning identifier according to the figure optimization method.
[0010] Combined with the first aspect, in the first possible implementation manner of the first aspect, when the key frame includes a positioning identifier, after determining the pose of the positioning identifier according to the image of the positioning identifier in the key frame and combining the robot pose corresponding to the key frame, the method further includes:
[0011] When the key frame includes a positioning identifier, determine whether the key frame before the current key frame includes the positioning identifier;
[0012] If the key frame before the current key frame includes the positioning identifier, determine the pose of the current key frame according to the pose of the positioning identifier.
[0013] Combined with the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, before determining the pose of the current key frame according to the pose of the positioning identifier and combining the pose of the positioning identifier, the method further includes:
[0014] Determine the number or the magnitude of the pose change of the key frames included between the current key frame and the previous key frame that includes the positioning identifier;
[0015] When the number of the key frames is greater than a predetermined number threshold, or the magnitude of the pose change is greater than a predetermined magnitude threshold, determine the pose of the current key frame according to the pose of the positioning identifier.
[0016] Combined with the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, after determining the pose of the current key frame according to the pose of the positioning identifier, the method further includes:
[0017] Optimize the robot pose corresponding to the key frames between two key frames including the same positioning identifier according to the pose of the current key frame;
[0018] Or optimize the robot pose corresponding to the key frames between two key frames including the same positioning identifier, and the pose of the positioning identifier included in the key frames between two key frames including the same positioning identifier.
[0019] Combined with the first aspect, in the fourth possible implementation manner of the first aspect, when the key frame includes a positioning identifier, determining the pose of the positioning identifier according to the image of the positioning identifier in the key frame and combining the robot pose corresponding to the key frame includes:
[0020] When the key frame includes a positioning identifier, determine whether the key frames before the current key frame include the positioning identifier;
[0021] If the key frames before the current key frame include the positioning identifier, and the current key frame and the key frame before the current key frame that includes the positioning identifier are adjacent key frames, then optimize the pose of the positioning identifier according to the current key frame.
[0022] Combined with the first aspect, in the fifth possible implementation manner of the first aspect, before obtaining the key frame through the sensing device, the method further includes:
[0023] Detect the working scene information of the robot;
[0024] Determine the distribution position of the positioning identifier according to the working scene information of the robot.
[0025] Combined with the fifth possible implementation manner of the first aspect, in the sixth possible implementation manner of the first aspect, determining the distribution position of the positioning identifier according to the working scene information of the robot includes:
[0026] When the working scene information meets the requirements of a predetermined open scene, determine the distribution position of the positioning identifier at a predetermined distance interval;
[0027] When the working scene information meets the requirements of a preset changing scene, detect the environmental change frequency in the working scene;
[0028] Determine the distribution position of the positioning identifier according to the environmental change frequency.
[0029] The second aspect of the embodiments of the present application provides a mapping device for a robot. Positioning identifiers are set in the scene where the robot is located. The device includes:
[0030] A key frame acquisition unit, configured to acquire a key frame through a sensing device during the movement of the robot, and determine the pose of the robot corresponding to the key frame;
[0031] A positioning identifier determination unit, configured to, when the key frame includes a positioning identifier, determine the pose of the positioning identifier according to the image of the positioning identifier in the key frame and in combination with the pose of the robot corresponding to the key frame;
[0032] A pose graph generation unit, configured to use the pose of the robot corresponding to the key frame and the pose of the positioning identifier as nodes, and use the relative pose relationship between the key frames and the relative pose relationship between the positioning identifier and the pose of the robot corresponding to the key frame as edges to generate a pose graph including loops;
[0033] A pose optimization unit is configured to optimize the robot pose corresponding to the key frame and the pose of the positioning identifier according to a graph optimization method.
[0034] In a third aspect of the embodiments of the present application, a robot is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to any one of the first aspects are implemented.
[0035] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of the first aspects are implemented.
[0036] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: By setting positioning identifiers in the working scenario where the robot is located, the present application records the key frames obtained during the movement of the robot and the robot poses corresponding to the key frames, and detects whether the key frames include positioning identifiers. If a positioning identifier is included, the pose of the included positioning identifier is determined. Using the robot pose corresponding to the key frame and the pose of the positioning identifier as nodes, and using the relative pose relationship between key frames and the relative pose relationship between the positioning identifier and the key frame as edges, a pose graph including loops is generated. Through the graph optimization method, the robot pose and the pose of the positioning identifier are optimized, thereby effectively improving the accuracy of the robot pose corresponding to the key frame and the pose of the positioning identifier, facilitating the robot to perform positioning and navigation more reliably, and reducing the frequency of map reconstruction. Description of the Drawings
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] Figure 1 It is a schematic flowchart of the implementation of a mapping method for a robot provided by an embodiment of the present application;
[0039] Figure 2 It is a schematic diagram of pose graph optimization during robot mapping provided by an embodiment of the present application;
[0040] Figure 3 It is another schematic diagram of pose graph optimization during robot mapping provided by an embodiment of the present application;
[0041] Figure 4It is a schematic diagram of a mapping device for a robot provided by an embodiment of the present application;
[0042] Figure 5 It is a schematic diagram of a robot provided by an embodiment of the present application. Detailed implementation manners
[0043] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0044] In order to illustrate the technical solutions described in the present application, the following will be described through specific embodiments.
[0045] When a robot performs tasks in a relatively open area, including work scenarios such as long corridors or warehouses, due to fewer positioning features in the work scenario, the images collected by the robot through a laser sensor or an image sensor cannot accurately position the robot, which may lead to inaccurate positioning of the robot and make it prone to navigation errors.
[0046] Or, when the robot is in a relatively complex area, including information such as moving items or people. When the robot builds a scene map of the work scenario at the first moment, at the second moment of performing the work task, the position or posture of the items or people in the work scenario has changed, such as in scenarios like offices, shopping malls, factories, etc. The scene features collected by the robot do not match the feature information in the constructed map, and it is impossible to complete the positioning and navigation of the robot, or it is necessary to frequently build the map of the work scenario where the robot is located, which is not conducive to improving the user experience.
[0047] Based on this, the present application proposes a mapping method for a robot, in which positioning identifiers are set in the work scenario where the robot is located, such as Figure 1 As shown, the implementation process of the mapping method of this robot includes:
[0048] In S101, during the movement of the robot, key frames are obtained through a sensing device, and the robot pose corresponding to the key frames is determined.
[0049] Among them, the robot can include a food delivery robot, a floor cleaning robot, an epidemic prevention robot, etc. When the robot starts mapping, the coordinate system of the constructed map can be determined at the position where the robot starts to move. For example, the starting position of the robot can be determined as the origin of the coordinate system of the constructed map. According to the determined coordinate system, it can be used to determine the coordinate position of the robot during movement. It can be understood that it is not necessary to be limited to taking the starting point as the origin of the coordinate system of the constructed map.
[0050] The pose of the robot includes the coordinate position and the attitude of the robot. When determining the coordinate position of the robot, it can be determined by a position sensor such as an odometer of the robot. When determining the attitude of the robot, it can be determined by an azimuth sensor of the robot. The azimuth sensor can include sensing devices such as a gyroscope.
[0051] During the movement of the robot, images in the scene can be collected in real time by the sensing devices provided on the robot. Among them, the sensing devices include but are not limited to lidar and / or image sensors. For example, the obstacle information in the scene can be collected by lidar, including the distance between the robot and the obstacle, and the azimuth relationship between the obstacle and the robot, etc.
[0052] The key frame can be determined according to the number of positioning features included in the collected image. For example, if it is detected that the number of positioning features in the collected image is greater than a predetermined number threshold, the collected image is taken as the key frame.
[0053] Alternatively, it can also be determined whether it is a key frame according to the number of positioning features in the collected image, combined with the pose difference between key frames. For example, if it is determined that the number of positioning features in the collected image is greater than a predetermined number threshold, and the pose difference between the current image and the pose corresponding to the previous key frame is greater than a predetermined difference threshold. The pose difference can include a distance difference and an angle difference. Correspondingly, the difference threshold can include a distance threshold and an angle threshold. For example, when the number of features is greater than a predetermined number threshold, and the angle difference between the two is greater than a predetermined angle threshold, or the distance threshold is greater than a predetermined distance threshold, the currently collected image can be taken as the key frame.
[0054] Among them, the positioning features can include the shape features of the obstacle, including, for example, the length of the line segment in the shape, the included angle of the line segment, etc.
[0055] In S102, when the key frame includes a positioning identifier, the pose of the positioning identifier is determined according to the image of the positioning identifier in the key frame, combined with the robot pose corresponding to the key frame.
[0056] After obtaining the key frame, the image in the key frame is detected to determine whether the key frame includes a positioning identifier. For example, the image collected can be feature-matched with the positioning identifier to detect whether the key frame includes a positioning identifier.
[0057] The positioning identifier described in the embodiments of the present application may include identifiers such as aruco codes. After the aruco code is set, it has a specific pose, that is, the aruco code itself has position characteristics and orientation characteristics. And different aruco codes have different identifiers or encodings.
[0058] When it is detected that the key frame includes a positioning identifier, such as an aruco code, the relative pose relationship between the robot and the aruco code can be determined based on the distances between the four vertices of the aruco code and the robot, combined with the direction identifier that the aruco code itself has.
[0059] Since the robot can determine its pose in real time based on the odometer and the orientation sensor during the movement process. Combining the relative pose relationship between the robot and the positioning identifier determined by the positioning identifier included in the key frame, the pose of the positioning identifier can be determined.
[0060] Since the pose of the robot will increase the error correspondingly as the mileage increases, therefore, the positioning identifier determined according to the pose of the robot with error will also have error accumulation, and it is necessary to further optimize this error to obtain the pose of the robot corresponding to the key frame with higher precision, and the pose corresponding to the positioning identifier.
[0061] In a possible implementation, if the same positioning identifier is included in two adjacent key frames (the first key frame and the second key frame respectively, and the first key frame is before the second key frame), after determining the pose of the positioning identifier according to the first key frame, the pose of the positioning identifier can be further corrected by the second pose.
[0062] For example, Figure 2 This is a pose graph composed of key frames and positioning identifiers provided by the embodiments of the present application. Among them, the nodes corresponding to the key frames are dark nodes, and the nodes corresponding to the positioning identifiers are white nodes. The key frame 3 includes the positioning identifier 1. According to the positioning identifier in the key frame 3, the relative pose relationship between the key frame 3 and the positioning identifier 1 can be determined. The key frame 4 includes the positioning identifier 2. The key frames 5 and 6 include the positioning identifier 3, and the key frames 5 and 6 are adjacent positioning frames.
[0063] Alternatively, when correcting the pose of the positioning identifier using a subsequent key frame, it is not limited to two adjacent key frames. It is also possible to correct the pose of the positioning identifier using a subsequent key frame when the distance between two key frames is less than a predetermined distance threshold, or the azimuth difference (or called azimuth angle) between two key frames is less than a predetermined angle threshold.
[0064] In a possible implementation, the key frame can also be corrected based on the pose of the positioning identifier determined by the key frame. For example, when it is detected that a key frame includes a positioning identifier, it can be determined whether the positioning identifier has appeared in a previous key frame. If it has appeared, the subsequent key frame can be corrected using the pose of the positioning identifier, or the difference between two key frames in which the same positioning identifier appears can be detected, and based on the difference, it can be determined whether it is necessary to correct the pose of the subsequent key frame using the positioning identifier.
[0065] Among them, the difference between key frames can be based on the number of key frames between two key frames, or the magnitude of the pose change between two key frames, including the distance between the positions of the robots corresponding to the two key frames, or the magnitude of the azimuth change of the robots corresponding to the two key frames.
[0066] When the number of the key frames is greater than a predetermined number threshold, or the magnitude of the pose change is greater than a predetermined magnitude threshold, including the distance between the positions of the robots corresponding to the two key frames is greater than a predetermined distance threshold, or the magnitude of the azimuth change of the robots corresponding to the two key frames is greater than a predetermined magnitude threshold, it indicates that a relatively large error has been accumulated in the subsequent key frame with respect to the previous key frame including the same positioning identifier. Then, based on the pose of the positioning identifier, the pose of the subsequent key frame, or the current key frame, is determined.
[0067] After correcting the pose of the subsequent key frame, if there are several key frames between the subsequent key frame including the same positioning identifier and the previous key frame including the same positioning identifier, the pose of the intermediate key frames can be further corrected according to the subsequent key frame. That is, the position and orientation of the intermediate key frames are adjusted according to the subsequent key frame. Or the intermediate key frames and the poses of the positioning identifiers included in the intermediate key frames are adjusted according to the subsequent key frame.
[0068] For example Figure 3 In the pose diagram shown, key frame 3 and key frame 7 have the same positioning identifier 2. When the positioning identifier 2 is detected in key frame 3, the pose of the positioning identifier 2 can be determined based on the pose corresponding to key frame 3, combined with the relative pose relationship of the positioning identifier 2 with respect to the pose corresponding to key frame 3 calculated from the image in the key frame.
[0069] When it is detected that the positioning identifier 2 detected previously is included in the key frame 7, the pose corresponding to the key frame 7 can be directly corrected by the positioning identifier 2, or it is determined that the pose corresponding to the key frame 7 needs to be corrected by the positioning identifier 2 based on the number of key frames in the intermediate interval or the amplitude of the pose change of the robot corresponding to the key frame 3 and the key frame 7. After correcting the pose of the key frame 7, the poses of the key frames before the key frame 7 can be corrected and optimized based on the corrected pose of the key frame 7, including, for example, the key frame 6, the key frame 5, the key frame 4, and the pose corresponding to the positioning identifier 3 associated with the key frame 4.
[0070] In S103, the pose of the robot corresponding to the key frame and the pose of the positioning identifier are used as nodes, and the relative pose relationship between the key frames and the relative pose relationship between the positioning identifier and the pose of the robot corresponding to the key frame are used as edges to generate a pose graph including loop closures.
[0071] During the movement of the robot, the pose corresponding to each key frame, the pose corresponding to each positioning identifier, the relative pose relationship between every two key frames, and the relative pose relationship between the positioning identifier and the key frame can be determined. A pose graph can be generated with the key frames and the positioning identifiers as nodes and the relative pose relationship as edges. That is, the pose graph includes nodes determined by the key frames and the positioning identifiers, and each node corresponds to the pose of the object (key frame or positioning identifier). The edge between the nodes corresponds to the relative pose relationship between the two nodes.
[0072] In S104, the pose of the robot corresponding to the key frame and the pose of the positioning identifier are optimized according to the graph optimization method.
[0073] It is possible to determine whether a subsequent key frame and a previous key frame are in the same position or the distance is less than a predetermined loop closure distance threshold through the image features included in the key frame. When they are in the same position or the distance is less than the predetermined loop closure distance threshold, it can be considered that a loop closure has occurred in the pose graph. Based on the two nodes where the loop closure has occurred, through the image optimization method, the pose of the subsequent node can be updated or optimized from the pose of the previous node. And the poses of other nodes on the loop closure, or other nodes on the loop closure and the poses of the positioning identifiers associated with the nodes are optimized. That is, by updating the node of the key frame after optimization, the pose of the positioning identifier included in the key frame is optimized.
[0074] For example Figure 3The pose graph shown, where node 1 (corresponding to key frame 1) and node 9 (corresponding to key frame 9) are loop closure points. Through graph optimization methods, based on the pose of node 1, the pose of node 9 can be updated and optimized, and based on the pose of node 9, the poses of nodes 8, 7, 6, 5, 4, 3, and 2 can be optimized. After optimizing the poses of the nodes corresponding to the key frames, the poses of the positioning identifiers associated with the nodes corresponding to the key frames can be further optimized according to the poses of the nodes corresponding to the key frames. Thus, the accuracy of the poses of the key frames and positioning identifiers in the constructed map can be effectively improved, and further the positioning accuracy of the robot during navigation can be improved. In an open scene and in a complex and changeable scene, the pose of the robot can be accurately determined through the positioning identifier.
[0075] In addition, when setting the positioning identifier in the embodiments of the present application, the working scene information where the robot is located can be collected through the image sensor of the robot, and the scene type can be determined according to the working scene information. That is, when the working scene information conforms to the requirements of the preset open scene, the working scene is an open scene. When the working scene information conforms to the requirements of the preset changing scene, the working scene is a changing scene.
[0076] Among them, the requirements of the changing scene can include the frequency of environmental changes in the scene, such as the frequency of changes in the pose of items.
[0077] When the working scene is an open scene, the positioning identifiers can be evenly set at a preset distance interval. When the working scene is a changing scene, the positions where the change frequency is greater than a predetermined frequency threshold can be set with positioning identifiers according to the magnitude of the change frequency of the item poses in the scene. And to reduce the occlusion of the positioning identifiers.
[0078] Among them, the graph optimization method includes but is not limited to optimization methods based on the g2o framework, based on the ceres library, based on the GTSAM library, or the SE-sync algorithm.
[0079] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0080] Figure 4 The following is a schematic diagram of a map building device for a robot provided by an embodiment of the present application. Positioning identifiers are set in the working scene where the robot is located, as Figure 4 shown, the device includes:
[0081] A key frame acquisition unit 401, configured to obtain key frames through a sensing device during the movement of the robot and determine the robot pose corresponding to the key frames;
[0082] A positioning identifier determination unit 402, configured to, when the positioning identifier is included in the key frame, determine the pose of the positioning identifier according to the image of the positioning identifier in the key frame and in combination with the robot pose corresponding to the key frame;
[0083] A pose graph generation unit 403, configured to use the robot pose corresponding to the key frame and the pose of the positioning identifier as nodes, and use the relative pose relationship between the key frames and the relative pose relationship between the positioning identifier and the robot pose corresponding to the key frame as edges to generate a pose graph including loops;
[0084] A pose optimization unit 404, configured to optimize the robot pose corresponding to the key frame and the pose of the positioning identifier according to a graph optimization method.
[0085] Figure 4 The mapping device of the robot shown corresponds to Figure 1 the robot mapping method shown.
[0086] Figure 5 is a schematic diagram of a robot provided by an embodiment of the present application. As Figure 5 shown, the robot 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a mapping program of the robot. When the processor 50 executes the computer program 52, the steps in the above-mentioned mapping method embodiments of each robot are implemented. Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are implemented.
[0087] Exemplarily, the computer program 52 can be divided into one or more modules / units, and the one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the robot 5.
[0088] The robot may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art can understand that Figure 5 this is only an example of the robot 5 and does not constitute a limitation on the robot 5. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the robot may further include input / output devices, network access devices, buses, etc.
[0089] The so-called processor 50 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0090] The memory 51 may be an internal storage unit of the robot 5, such as the hard disk or memory of the robot 5. The memory 51 may also be an external storage device of the robot 5, such as a plug-in hard disk equipped on the robot 5, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 51 may also include both the internal storage unit of the robot 5 and the external storage device. The memory 51 is used to store the computer program and other programs and data required by the robot. The memory 51 may also be used to temporarily store the data that has been output or will be output.
[0091] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0092] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0093] Those of ordinary skill in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0094] In the embodiments provided in this application, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0095] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0096] In addition, the functional units in each embodiment of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0097] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present application, it can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0098] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A mapping method for a robot, characterized in that, There are positioning identifiers set in the working scenario where the robot is located, and the method includes: During the movement of the robot, key frames are obtained through a sensing device to determine the pose of the robot corresponding to the key frames; wherein, the key frames are determined according to the number of positioning features included in the captured images, or according to the number of positioning features in the captured images, in combination with the pose differences between the key frames; the positioning features include the shape features of obstacles; When the key frames include positioning identifiers, according to the images of the positioning identifiers in the key frames, in combination with the pose of the robot corresponding to the key frames, to determine the pose of the positioning identifiers, including: when the key frames include positioning identifiers, determining whether the key frames before the current key frame include the positioning identifier; if the key frames before the current key frame include the positioning identifier, and the current key frame and the key frame before the current key frame that includes the positioning identifier are adjacent key frames, then optimizing the pose of the positioning identifier according to the current key frame; Taking the pose of the robot corresponding to the key frames and the pose of the positioning identifiers as nodes, and taking the relative pose relationships between the key frames and the relative pose relationships between the positioning identifiers and the pose of the robot corresponding to the key frames as edges, to generate a pose graph including loops; Optimizing the pose of the robot corresponding to the key frames and the pose of the positioning identifiers according to the graph optimization method, including: based on the two nodes of the generated loop, through the image optimization method, updating or optimizing the pose of the subsequent node from the pose of the prior node, and optimizing the poses of other nodes on the loop, or the poses of other nodes on the loop and the positioning identifiers associated with the nodes.
2. The method according to claim 1, wherein After determining the pose of the positioning identifier according to the image of the positioning identifier in the key frame, in combination with the pose of the robot corresponding to the key frame, when the key frame includes the positioning identifier, the method further includes: When the key frame includes the positioning identifier, determining whether the key frames before the current key frame include the positioning identifier; If the key frames before the current key frame include the positioning identifier, then determining the pose of the current key frame according to the pose of the positioning identifier.
3. The method according to claim 2, wherein, before determining the pose of the current key frame according to the pose of the positioning identifier, in combination with the pose of the positioning identifier, the method further includes: Determining the number of key frames or the pose change range included between the current key frame and the key frames before that include the positioning identifier; When the number of the key frames is greater than a predetermined number threshold, or the pose change range is greater than a predetermined amplitude threshold, then determining the pose of the current key frame according to the pose of the positioning identifier.
4. The method according to claim 3, wherein After determining the pose of the current key frame according to the pose of the positioning identifier, the method further includes: Optimizing the pose of the robot corresponding to the key frames between two key frames including the same positioning identifier according to the pose of the current key frame; Or optimize the pose of the robot corresponding to the key frames between two key frames including the same positioning identifier, and the pose of the positioning identifier included in the key frames between two key frames including the same positioning identifier.
5. The method according to claim 1, wherein Before acquiring the key frames through the sensing device, the method further includes: Detecting the working scene information of the robot; Determining the distribution position of the positioning identifier according to the working scene information of the robot.
6. The method according to claim 5, wherein Determining the distribution position of the positioning identifier according to the working scene information of the robot includes: When the working scene information meets the requirements of a predetermined open scene, determining the distribution position of the positioning identifier at a predetermined distance interval; When the working scene information meets the requirements of a preset changing scene, detecting the environmental change frequency in the working scene; Determining the distribution position of the positioning identifier according to the environmental change frequency.
7. A mapping device for a robot, characterized in that, There are positioning identifiers set in the working scene where the robot is located. The device includes: A key frame acquisition unit, configured to acquire key frames through a sensing device during the movement of the robot and determine the pose of the robot corresponding to the key frames; wherein, the key frames are determined according to the number of positioning features included in the acquired images, or according to the number of positioning features in the acquired images, in combination with the pose difference between key frames; the positioning features include the shape features of obstacles. A positioning identifier determination unit, configured to, when the key frame includes a positioning identifier, determine the pose of the positioning identifier according to the image of the positioning identifier in the key frame and in combination with the pose of the robot corresponding to the key frame, including: when the key frame includes a positioning identifier, determining whether the key frame before the current key frame includes the positioning identifier; if the key frame before the current key frame includes the positioning identifier and the current key frame and the key frame before the current key frame including the positioning identifier are adjacent key frames, optimizing the pose of the positioning identifier according to the current key frame. A pose graph generation unit, configured to use the pose of the robot corresponding to the key frames and the pose of the positioning identifier as nodes, and use the relative pose relationship between the key frames and the relative pose relationship between the positioning identifier and the pose of the robot corresponding to the key frame as edges to generate a pose graph including loops. A pose optimization unit, configured to optimize the pose of the robot corresponding to the key frames and the pose of the positioning identifier according to a graph optimization method, including: based on two nodes of the generated loop, through an image optimization method, updating or optimizing the pose of the subsequent node from the pose of the prior node, and optimizing the poses of other nodes on the loop, or the poses of other nodes on the loop and the positioning identifiers associated with the nodes.
8. A robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for identifying and positioning based on two-dimensional codes
CN111652338A
Construction method and device of visual point cloud map
CN111795704A
Conversion method and conversion device of positioning results among different navigation modes
CN112129282A
Local map construction method and device, storage medium and robot
CN118189948A