Robot automatic charging method, system, terminal device and storage medium
By generating charging navigation paths and calculating point cloud errors, automatic charging positioning of robots and charging piles is achieved, which solves the problem of cumbersome user operations in the existing technology and improves the user experience and charging accuracy.
Patent Information
- Application Number
- CN202110344749.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-03-31
AI Technical Summary
In the existing automatic charging process of robots, marking features are used to achieve charging positioning, which results in cumbersome user operations and reduces the user experience.
By generating a charging navigation path and using the point cloud error calculation between the point cloud map and the preset reference map, the robot is controlled to move to the end of the path of the charging pile, and the posture is adjusted according to the posture transformation parameters to realize automatic charging of the robot and the charging pile. Positioning avoids the structural deployment and installation of charging piles.
There is no need to set marking features on the charging pile, which simplifies user operations, improves user experience, and improves charging positioning accuracy.
Smart Images

Figure CN113138596B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of automatic charging technology, and in particular, relates to a robot automatic charging method, system, terminal device and storage medium. Background Art
[0002] With the development of science and technology, more and more robots are entering the public's field of vision. They can be seen in banks, restaurants, hospitals, etc., and even some service robots have entered people's homes. Because most service robots are powered by batteries, in daily use, when the robot's power is exhausted or about to be exhausted, the robot needs to be connected to the charging pile for charging. Repeated daily charging of the robot greatly reduces the user's experience of the robot. Therefore, the robot's automatic charging function is very necessary.
[0003] In the existing robot automatic charging process, the charging positioning between the robot and the charging pile is achieved by using marking features. For example, mechanical structural features such as arcs or deep grooves are set on the charging pile to achieve the charging positioning between the robot and the charging pile. However, since the charging positioning between the robot and the charging pile is achieved by using marking features, the charging pile needs to be structurally deployed and installed, which makes the user operation cumbersome and reduces the user experience. Summary of the invention
[0004] The embodiments of the present application provide a robot automatic charging method, system, terminal device and storage medium, which aim to solve the problem of cumbersome user operation and poor user experience caused by the use of marking features to achieve charging positioning between the robot and the charging pile during the existing robot automatic charging process.
[0005] In a first aspect, an embodiment of the present application provides a robot automatic charging method, the method comprising:
[0006] If a charging instruction is received, a charging navigation path is generated, and the robot is controlled to move to the end point of the charging navigation path according to the charging navigation path;
[0007] Acquire a point cloud map of the current environment of the robot, wherein the point cloud map includes a first data point, and the first data point is a data vector corresponding to an obstacle in the current environment;
[0008] Calculating a point cloud error between the point cloud map and different preset reference maps, wherein one of the preset reference maps is a point cloud map when the robot is in a charging docking state with a charging pile, and the point cloud error is used to characterize a distance error of an average value of a point cloud distance between the point cloud map and the preset reference map, and the point cloud distance is used to characterize a distance between an obstacle and a map origin;
[0009] Calculate the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and control the robot to perform posture transformation according to the posture transformation parameters.
[0010] Compared with the prior art, the embodiment of the present application has the following beneficial effects: if a charging instruction is received, the robot can be effectively controlled to move to the end of the path by generating a charging navigation path. The end of the path is obtained by calculating the point cloud error between the point cloud map and different preset reference maps to obtain the distance error of the point cloud distance between the point cloud map and different preset reference maps. Since the preset reference map is the point cloud map when the robot and the charging pile are in the charging docking state, when the point cloud error is the smallest, it indicates that the point cloud map is more similar to the preset reference map corresponding to the minimum point cloud error. By calculating the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, the posture transformation parameters between the current posture of the robot and the standard posture in the preset reference map corresponding to the minimum point cloud error can be effectively calculated. According to the calculated posture transformation parameters, the robot is controlled to perform posture transformation to achieve the automatic charging positioning effect between the charging pile and the charging pile. The embodiment of the present application does not need to set a marking feature on the charging pile, that is, it is not necessary to deploy and install the characteristic structure of the charging pile, which facilitates the user's operation and improves the user's experience.
[0011] Furthermore, the calculating of the point cloud error between the point cloud map and different preset reference maps includes:
[0012] For different preset reference maps, constructing a point cloud pair according to the first data point and a second data point in the preset reference map, wherein the second data point is a data vector corresponding to an obstacle in the preset reference map, and a similarity between the first data point and the second data point in the same point cloud pair is greater than a similarity threshold;
[0013] Calculate the rotation and translation matrix corresponding to the point cloud pair according to the least squares function, wherein the rotation and translation matrix includes a rotation matrix and a translation vector, and calculate the change amount of the rotation and translation matrix;
[0014] If the change of the rotation and translation matrix is less than the change threshold, outputting the rotation and translation matrix;
[0015] If the change amount of the rotation and translation matrix is greater than or equal to the change amount threshold, performing a position transformation on the first data point in the point cloud map according to the calculated rotation and translation matrix;
[0016] According to the data points in the point cloud map after the position transformation, continue to perform the step of constructing a point cloud pair according to the first data points and the second data points in the preset reference map until the change amount of the rotation and translation matrix is less than the change amount threshold, and output the rotation and translation matrix;
[0017] The point cloud error between the point cloud map and different preset reference maps is calculated according to the output rotation and translation matrix.
[0018] Furthermore, the calculation formula used for calculating the point cloud error between the point cloud map and different preset reference maps according to the output rotation and translation matrix is:
[0019] E=P ref -(R*P sim +t)
[0020] Where E is the point cloud error, P ref is the average value of the point cloud distance in the preset reference map corresponding to the minimum point cloud error, P sim is the average value of the point cloud distance in the point cloud map, R is the rotation matrix in the output rotation and translation matrix, and t is the translation vector in the output rotation and translation matrix.
[0021] Furthermore, before calculating the point cloud error between the point cloud map and different preset reference maps, the method further includes:
[0022] The robot is docked with different charging piles for charging, and radar images are scanned according to different preset scanning angles to obtain radar point cloud images;
[0023] For the same charging pile, different radar point cloud images obtained at different preset scanning angles are combined to obtain the preset reference map, and an average value of point cloud distances in different radar point cloud images is obtained;
[0024] The average values of the point cloud distances in different radar point cloud images are calculated to obtain a reference average value, and the average value between the calculated reference average values is set as the average value of the point cloud distances in the corresponding preset reference map.
[0025] Further, generating a charging navigation path includes:
[0026] Obtaining the position coordinates of the robot, and calculating the moving distances between the position coordinates and different charging piles;
[0027] The charging pile corresponding to the minimum moving distance is set as the target charging pile, and the path end point is obtained in the path direction between the target charging pile and the robot, and the distance between the path end point and the charging pile is equal to the preset distance;
[0028] The charging navigation path is generated according to the coordinates of the path end point and the position coordinates of the robot.
[0029] Furthermore, the step of obtaining a point cloud map of the robot's current environment includes:
[0030] The end point of the path is taken as the origin, the preset direction is taken as the positive direction, and the robot is controlled to rotate at a preset angle according to a preset angular resolution to perform radar image scanning to obtain a point cloud map of the current environment.
[0031] Furthermore, the calculating of the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and controlling the robot to perform posture transformation according to the posture transformation parameters, comprises:
[0032] Obtaining the horizontal transformation parameters, vertical transformation parameters and rotation angle in the output rotation and translation matrix to obtain the posture transformation parameters;
[0033] The robot is controlled to perform horizontal posture transformation, vertical posture transformation and angular posture transformation according to the horizontal transformation parameter, the vertical transformation parameter and the rotation angle respectively.
[0034] In a second aspect, an embodiment of the present application provides a robot automatic charging system, comprising:
[0035] A navigation module, configured to generate a charging navigation path if a charging instruction is received, and control the robot to move to a path end point of the charging navigation path according to the charging navigation path;
[0036] A point cloud map acquisition module, used to acquire a point cloud map of the environment in which the robot is currently located, wherein the point cloud map includes a first data point, and the first data point is a data vector corresponding to an obstacle in the current environment;
[0037] a point cloud error calculation module, used to calculate the point cloud error between the point cloud map and different preset reference maps, one of the preset reference maps being a point cloud map when the robot is in a charging docking state with a charging pile, the point cloud error being used to characterize the distance error of the average value of the point cloud distance between the point cloud map and the preset reference map, the point cloud distance being used to characterize the distance between an obstacle and a map origin;
[0038] The posture transformation module is used to calculate the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and control the robot to perform posture transformation according to the posture transformation parameters.
[0039] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0040] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0041] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the robot automatic charging method described in any one of the above-mentioned first aspects.
[0042] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0044] Figure 1 is a flow chart of the robot automatic charging method provided by the first embodiment of the present application;
[0045] Figure 2 is a flow chart of a robot automatic charging method provided in a second embodiment of the present application;
[0046] Figure 3 is a schematic structural diagram of a robot automatic charging system provided in a third embodiment of the present application;
[0047] Figure 4 It is a structural diagram of the terminal device provided in the fourth embodiment of the present application. DETAILED DESCRIPTION
[0048] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may 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 prevent unnecessary details from obstructing the description of the present application.
[0049] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0050] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0051] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0052] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0053] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0054] Embodiment 1
[0055] See also Figure 1 , is a flow chart of the robot automatic charging method provided by the first embodiment of the present application, comprising the steps of:
[0056] Step S10, if a charging instruction is received, generating a charging navigation path, and controlling the robot to move to the end point of the charging navigation path according to the charging navigation path;
[0057] Among them, when it is detected that the robot's power is less than the power threshold, it is determined that the charging instruction is received and a charging navigation path is generated, or when a charging instruction manually sent by the user is received, a charging navigation path is generated. The charging navigation path is used to control the robot to move to the corresponding posture change point, which is the end point of the charging navigation path. By controlling the robot to move to the corresponding posture change point, the space required for the subsequent posture change of the robot is guaranteed.
[0058] Specifically, in this step, generating a charging navigation path includes:
[0059] Obtaining the position coordinates of the robot, and calculating the moving distances between the position coordinates and different charging piles;
[0060] The robot is provided with a positioning device, based on which the position coordinates of the robot can be effectively obtained. In this embodiment, a charging pile coordinate list is pre-stored, and the charging pile coordinate list stores the charging coordinates corresponding to different charging piles. In this step, the moving distance between the robot and different charging piles is obtained by respectively calculating the distance between the position coordinates of the robot and the charging coordinates in the charging pile coordinate list;
[0061] The charging pile corresponding to the minimum moving distance is set as the target charging pile, and the path end point is obtained in the path direction between the target charging pile and the robot;
[0062] Among them, the distance between the end point of the path and the charging pile is equal to the preset distance, and the preset distance can be set according to needs. In this embodiment, the preset distance can be set to be greater than or equal to 1 cm and less than or equal to 30 cm. In this step, by obtaining the end point of the path in the path direction of the target charging pile and the robot, it is effectively prevented from directly setting the corresponding position of the charging pile as the end point of the path, thereby ensuring the space required for the subsequent posture change of the robot.
[0063] The charging navigation path is generated according to the coordinates of the path end point and the position coordinates of the robot, wherein the robot can be effectively controlled to move to the path end point according to the generated charging navigation path.
[0064] Step S20, obtaining a point cloud map of the robot's current environment;
[0065] The robot is provided with an image scanning device, which may be, for example, a laser radar (2D / 3D), a stereo camera, or a time-of-flight camera. In this step, the image scanning device is controlled to perform a radar scan on the current environment of the robot to obtain the point cloud map, which includes a first data point, which is a data vector corresponding to an obstacle in the current environment.
[0066] Specifically, in this step, the point cloud map of the robot's current environment is obtained, including: taking the end point of the path as the origin, the preset direction as the positive direction, and controlling the robot to rotate a preset angle according to a preset angular resolution to perform radar image scanning, so as to obtain a point cloud map of the current environment, wherein the preset direction, preset angular resolution and preset angle can be set as required, for example, the counterclockwise direction can be set as the positive direction, and 360° can be set as the preset angle.
[0067] Step S30, calculating the point cloud error between the point cloud map and different preset reference maps;
[0068] Among them, a preset reference map is a point cloud map when the robot is in a charging docking state with a charging pile. The point cloud error is used to characterize the distance error of the average value of the point cloud distance between the point cloud map and the preset reference map. The point cloud distance is used to characterize the distance between the obstacle and the map origin.
[0069] Furthermore, in this embodiment, before calculating the point cloud error between the point cloud map and different preset reference maps, the method further includes:
[0070] The robot is docked with different charging piles for charging, and radar images are scanned according to different preset scanning angles to obtain radar point cloud images, wherein the preset scanning angle can be set according to requirements. In this step, the maximum preset scanning angle is Angle max , the minimum preset scanning angle is Angle min , from Angle min to Angle max , respectively obtain the radar point cloud image corresponding to one frame;
[0071] For the same charging pile, different radar point cloud images obtained at different preset scanning angles are combined to obtain the preset reference map, and the average value of the point cloud distances in different radar point cloud images is obtained, wherein for different charging piles, the Angle min to Angle maxThe radar point cloud images of the corresponding frames are combined to obtain preset reference maps corresponding to different charging piles, that is, each charging pile corresponds to a preset reference map;
[0072] Calculating the average values of the point cloud distances in different radar point cloud images to obtain a reference average value, and setting the average value between the calculated reference average values as the average value of the point cloud distances in the corresponding preset reference map;
[0073] The reference average value is obtained by calculating the average value of the point cloud distances corresponding to the obstacles in different radar point cloud images, and for the same preset reference map, the calculated reference average value is set as the average value of the point cloud distances in the corresponding preset reference map;
[0074] For example, for charging pile A1, from Angle min to Angle max The radar point cloud images obtained after radar scanning include radar point cloud image a1, radar point cloud image a2 and radar point cloud image a3. The radar point cloud images a1, radar point cloud image a2 and radar point cloud image a3 are combined to obtain a preset reference map C1. The average values of the point cloud distances corresponding to the obstacles in the radar point cloud images a1, radar point cloud image a2 and radar point cloud image a3 are calculated respectively to obtain the reference average values b1, reference average values b2 and reference average values b3, and the average value between the reference average values b1, reference average values b2 and reference average values b3 is set as the average value of the point cloud distances in the preset reference map C1.
[0075] Step S40, calculating a posture transformation parameter between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and controlling the robot to perform posture transformation according to the posture transformation parameter;
[0076] Among them, because the preset reference map is the point cloud map when the robot and the charging pile are in a charging docking state, when the point cloud error is the smallest, it is determined that the point cloud map is more similar to the preset reference map corresponding to the minimum point cloud error, that is, the current posture of the robot is more similar to the standard posture in the preset reference map. By calculating the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, the posture transformation parameters between the current posture of the robot and the standard posture in the preset reference map corresponding to the minimum point cloud error can be effectively calculated.
[0077] Specifically, in this step, the step of calculating the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and controlling the robot to perform posture transformation according to the posture transformation parameters, includes:
[0078] The horizontal transformation parameters, vertical transformation parameters and rotation angle in the output rotation and translation matrix are obtained to obtain the posture transformation parameters, and the robot is controlled to perform horizontal posture transformation, vertical posture transformation and angular posture transformation according to the horizontal transformation parameters, the vertical transformation parameters and the rotation angle, respectively. By controlling the robot to perform horizontal posture transformation, vertical posture transformation and angular posture transformation according to the horizontal transformation parameters, the vertical transformation parameters and the rotation angle, respectively, the robot can accurately perform charging docking with the charging pile, thereby improving the accuracy of charging positioning during the robot's automatic charging process.
[0079] In this embodiment, if a charging instruction is received, the robot can be effectively controlled to move to the end of the path by generating a charging navigation path, and the point cloud error between the point cloud map and different preset reference maps is calculated to obtain the distance error of the point cloud distance between the point cloud map and different preset reference maps. Because the preset reference map is the point cloud map when the robot and the charging pile are in a charging docking state, when the point cloud error is the smallest, it is determined that the point cloud map is more similar to the preset reference map corresponding to the minimum point cloud error. By calculating the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, the posture transformation parameters between the current posture of the robot and the standard posture in the preset reference map corresponding to the minimum point cloud error can be effectively calculated. The robot is controlled to perform posture transformation according to the calculated posture transformation parameters to achieve an automatic charging positioning effect with the charging pile. The embodiment of the present application does not need to set marking features on the charging pile, that is, there is no need to deploy and install feature structures on the charging pile, which facilitates user operation and improves user experience.
[0080] Embodiment 2
[0081] See also Figure 2 , is a flow chart of the robot automatic charging method provided by the second embodiment of the present application, and the second embodiment is used to refine step S30, including:
[0082] Step S31, for different preset reference maps, constructing a point cloud pair according to the first data point and a second data point in the preset reference map;
[0083] The second data point is a data vector corresponding to an obstacle in the preset reference map. For example, when the preset reference map includes a preset reference map C1, a preset reference map C2, and a preset reference map C3, the first data point is respectively constructed with the second data point in the preset reference map C1, the preset reference map C2, and the preset reference map C3 to obtain a point cloud pair e1, a point cloud pair e2, and a point cloud pair e3.
[0084] Specifically, the similarity between the first data point and the second data point in the same point cloud pair is greater than the similarity threshold. In this step, according to the Euclidean distance formula, the distance (similarity) between the first data point and different second data points is calculated respectively, and the second data point with a similarity greater than the similarity threshold is set as the matching point of the first data point, and the point cloud pair is constructed based on the first data point and the matching point.
[0085] Optionally, in this step, for the same preset reference map, the second data point corresponding to the maximum similarity of the first data point in the preset reference map is set as the matching point of the first data point, and the point cloud pair is constructed based on the first data point and the matching point.
[0086] Step S32, calculating the rotation and translation matrix corresponding to the point cloud pair according to the least squares function, and calculating the change amount of the rotation and translation matrix;
[0087] Among them, the rotation and translation matrix includes a rotation matrix and a translation vector. In this step, by calculating the change of the rotation and translation matrix, it is possible to effectively determine whether the parameters in the rotation and translation matrix converge. That is, when the change of the rotation and translation matrix is less than the change threshold, it is determined that the rotation and translation matrix converges; when the change of the rotation and translation matrix is greater than or equal to the change threshold, it is determined that the rotation and translation matrix does not converge.
[0088] Specifically, in this step, for different preset reference maps, the rotation and translation matrices corresponding to the corresponding point cloud pairs are calculated according to the least squares function, and the change amount of the rotation and translation matrices is calculated.
[0089] Step S33: if the change of the rotation and translation matrix is less than the change threshold, output the rotation and translation matrix;
[0090] Among them, if the change of the rotation and translation matrix is less than the change threshold, it is determined that the change of the first data point in the point cloud map after the rotation and translation matrix is less than the change threshold, that is, it is determined that the posture of the robot after the posture change corresponding to the posture transformation parameters of the rotation and translation matrix is greater than the preset similarity between the posture of the robot in the preset reference map and the standard posture. Therefore, by outputting the rotation and translation matrix, the accuracy of subsequent robot posture transformation is improved.
[0091] Step S34, if the change amount of the rotation and translation matrix is greater than or equal to the change amount threshold, performing a position transformation on the first data point in the point cloud map according to the calculated rotation and translation matrix;
[0092] Among them, by transforming the position of the first data point in the point cloud map according to the calculated rotation and translation matrix, the subsequent detection of whether the rotation and translation matrix converges is guaranteed.
[0093] Step S35, according to the data points in the point cloud map after the position transformation, continue to execute the step of constructing a point cloud pair according to the first data points and the second data points in the preset reference map until the change amount of the rotation and translation matrix is less than the change amount threshold, and output the rotation and translation matrix;
[0094] Among them, by continuing to execute the step of constructing a point cloud pair based on the first data point and the second data point according to the data points in the point cloud map after the position transformation, the rotation and translation matrix can be effectively iteratively updated, thereby improving the accuracy of the rotation and translation matrix.
[0095] Specifically, in this step, for different preset reference maps, corresponding converged rotation and translation matrices are output.
[0096] Step S36, calculating the point cloud error between the point cloud map and different preset reference maps according to the output rotation and translation matrix;
[0097] Specifically, the calculation formula used to calculate the point cloud error between the point cloud map and different preset reference maps according to the output rotation and translation matrix is:
[0098] E=P ref -(R*P sim +t)
[0099] Where E is the point cloud error, P ref is the average value of the point cloud distance in the preset reference map corresponding to the minimum point cloud error, P sim is the average value of the point cloud distance in the point cloud map, R is the rotation matrix in the output rotation and translation matrix, and t is the translation vector in the output rotation and translation matrix.
[0100] In this embodiment, a point cloud pair is constructed based on the first data point and the corresponding second data point, which effectively improves the accuracy of calculating the rotation translation matrix and the change of the rotation translation matrix. By calculating the change of the rotation translation matrix, it can be effectively judged whether the parameters in the rotation translation matrix converge. If the change of the rotation translation matrix is less than the change threshold, it is determined that the change of the first data point in the point cloud map after the rotation translation matrix is changed is less than the change threshold, that is, the rotation translation matrix converges. By transforming the position of the first data point in the point cloud map according to the calculated rotation translation matrix, and continuing to execute the step of constructing a point cloud pair based on the first data point and the second data point according to the data points in the point cloud map after the position transformation, the rotation translation matrix can be effectively iteratively updated, thereby improving the accuracy of the rotation translation matrix.
[0101] Embodiment 3
[0102] Corresponding to the robot automatic charging method described in the above embodiment, Figure 3 A schematic structural diagram of a robot automatic charging system 100 provided in a third embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0103] Reference Figure 3 The system includes: a navigation module 10, a point cloud map acquisition module 11, a point cloud error calculation module 12 and a posture transformation module 13, wherein:
[0104] The navigation module 10 is used to generate a charging navigation path if a charging instruction is received, and control the robot to move to the path end point of the charging navigation path according to the charging navigation path.
[0105] The navigation module 10 is further used to: obtain the position coordinates of the robot, and calculate the moving distance between the position coordinates and different charging piles;
[0106] The charging pile corresponding to the minimum moving distance is set as the target charging pile, and the path end point is obtained in the path direction between the target charging pile and the robot, and the distance between the path end point and the charging pile is equal to the preset distance;
[0107] The charging navigation path is generated according to the coordinates of the path end point and the position coordinates of the robot.
[0108] The point cloud map acquisition module 11 is used to obtain a point cloud map of the robot's current environment, wherein the point cloud map includes a first data point, which is a data vector corresponding to an obstacle in the current environment.
[0109] Among them, the point cloud map acquisition module 11 is also used to: take the end point of the path as the origin, the preset direction as the positive direction, and control the robot to rotate a preset angle according to a preset angular resolution to perform radar image scanning, so as to obtain a point cloud map of the current environment.
[0110] The point cloud error calculation module 12 is used to calculate the point cloud error between the point cloud map and different preset reference maps, one of the preset reference maps is a point cloud map when the robot is in a charging docking state with a charging pile, and the point cloud error is used to characterize the distance error of the average value of the point cloud distance between the point cloud map and the preset reference map, and the point cloud distance is used to characterize the distance between an obstacle and the origin of the map.
[0111] The point cloud error calculation module 12 is further used to: for different preset reference maps, construct a point cloud pair according to the first data point and a second data point in the preset reference map, wherein the second data point is a data vector corresponding to an obstacle in the preset reference map, and the similarity between the first data point and the second data point in the same point cloud pair is greater than a similarity threshold;
[0112] Calculate the rotation and translation matrix corresponding to the point cloud pair according to the least squares function, wherein the rotation and translation matrix includes a rotation matrix and a translation vector, and calculate the change amount of the rotation and translation matrix;
[0113] If the change of the rotation and translation matrix is less than the change threshold, outputting the rotation and translation matrix;
[0114] If the change amount of the rotation and translation matrix is greater than or equal to the change amount threshold, performing a position transformation on the first data point in the point cloud map according to the calculated rotation and translation matrix;
[0115] According to the data points in the point cloud map after the position transformation, continue to perform the step of constructing a point cloud pair according to the first data points and the second data points in the preset reference map until the change amount of the rotation and translation matrix is less than the change amount threshold, and output the rotation and translation matrix;
[0116] The point cloud error between the point cloud map and different preset reference maps is calculated according to the output rotation and translation matrix.
[0117] Specifically, the calculation formula used to calculate the point cloud error between the point cloud map and different preset reference maps according to the output rotation and translation matrix is:
[0118] E=P ref -(R*P sim +t)
[0119] Where E is the point cloud error, P ref is the average value of the point cloud distance in the preset reference map corresponding to the minimum point cloud error, P sim is the average value of the point cloud distance in the point cloud map, R is the rotation matrix in the output rotation and translation matrix, and t is the translation vector in the output rotation and translation matrix.
[0120] The posture transformation module 13 is used to calculate the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and control the robot to perform posture transformation according to the posture transformation parameters.
[0121] The posture transformation module 13 is further used to: obtain the horizontal transformation parameters, vertical transformation parameters and rotation angle in the output rotation and translation matrix to obtain the posture transformation parameters;
[0122] The robot is controlled to perform horizontal posture transformation, vertical posture transformation and angular posture transformation according to the horizontal transformation parameter, the vertical transformation parameter and the rotation angle respectively.
[0123] Furthermore, the robot automatic charging system 100 also includes:
[0124] A reference map generation module 14 is used to charge and dock the robot with different charging piles, and perform radar image scanning according to different preset scanning angles to obtain a radar point cloud image;
[0125] For the same charging pile, different radar point cloud images obtained at different preset scanning angles are combined to obtain the preset reference map, and an average value of point cloud distances in different radar point cloud images is obtained;
[0126] The average values of the point cloud distances in different radar point cloud images are calculated to obtain a reference average value, and the average value between the calculated reference average values is set as the average value of the point cloud distances in the corresponding preset reference map.
[0127] In this embodiment, if a charging instruction is received, the robot can be effectively controlled to move to the end of the path by generating a charging navigation path, and the point cloud error between the point cloud map and different preset reference maps is calculated to obtain the distance error of the point cloud distance between the point cloud map and different preset reference maps. Because the preset reference map is the point cloud map when the robot and the charging pile are in a charging docking state, when the point cloud error is the smallest, it is determined that the point cloud map is more similar to the preset reference map corresponding to the minimum point cloud error. By calculating the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, the posture transformation parameters between the current posture of the robot and the standard posture in the preset reference map corresponding to the minimum point cloud error can be effectively calculated. The robot is controlled to perform posture transformation according to the calculated posture transformation parameters to achieve an automatic charging positioning effect with the charging pile. The embodiment of the present application does not need to set marking features on the charging pile, that is, there is no need to deploy and install feature structures on the charging pile, which facilitates user operation and improves user experience.
[0128] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0129] Figure 4This is a schematic diagram of the structure of the terminal device 2 provided in the fourth embodiment of the present application. Figure 4 As shown, the terminal device 2 of this embodiment includes: at least one processor 20 ( Figure 4 Only one processor is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps in any of the above-mentioned method embodiments when executing the computer program 22.
[0130] The terminal device 2 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 4 It is only an example of the terminal device 2 and does not constitute a limitation on the terminal device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0131] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0132] In some embodiments, the memory 21 may be an internal storage unit of the terminal device 2, such as a hard disk or memory of the terminal device 2. In other embodiments, the memory 21 may also be an external storage device of the terminal device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the terminal device 2. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0133] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0134] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0135] An embodiment of the present application further provides a storage medium, which may be a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0136] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0138] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0139] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0140] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A robot automatic charging method, It is characterized in that The method comprises: If a charging instruction is received, a charging navigation path is generated, and the robot is controlled to move to the end point of the charging navigation path according to the charging navigation path; Acquire a point cloud map of the current environment of the robot, wherein the point cloud map includes a first data point, and the first data point is a data vector corresponding to an obstacle in the current environment; Calculating a point cloud error between the point cloud map and different preset reference maps, wherein one of the preset reference maps is a point cloud map when the robot is in a charging docking state with a charging pile, and the point cloud error is used to characterize a distance error of an average value of a point cloud distance between the point cloud map and the preset reference map, and the point cloud distance is used to characterize a distance between an obstacle and a map origin; Calculate the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and control the robot to perform posture transformation according to the posture transformation parameters.
2. The robot automatic charging method according to claim 1, It is characterized in that The calculating the point cloud error between the point cloud map and different preset reference maps includes: For different preset reference maps, constructing a point cloud pair according to the first data point and a second data point in the preset reference map, wherein the second data point is a data vector corresponding to an obstacle in the preset reference map, and a similarity between the first data point and the second data point in the same point cloud pair is greater than a similarity threshold; Calculate the rotation and translation matrix corresponding to the point cloud pair according to the least squares function, wherein the rotation and translation matrix includes a rotation matrix and a translation vector, and calculate the change amount of the rotation and translation matrix; If the change of the rotation and translation matrix is less than the change threshold, outputting the rotation and translation matrix; If the change amount of the rotation and translation matrix is greater than or equal to the change amount threshold, performing a position transformation on the first data point in the point cloud map according to the calculated rotation and translation matrix; According to the data points in the point cloud map after the position transformation, continue to perform the step of constructing a point cloud pair according to the first data points and the second data points in the preset reference map until the change amount of the rotation and translation matrix is less than the change amount threshold, and output the rotation and translation matrix; The point cloud error between the point cloud map and different preset reference maps is calculated according to the output rotation and translation matrix.
3. The robot automatic charging method according to claim 2, It is characterized in that The calculation formula used to calculate the point cloud error between the point cloud map and different preset reference maps according to the output rotation and translation matrix is: Where, E is the point cloud error, P ref is the average value of the point cloud distance in the preset reference map corresponding to the point cloud error, P sim is the average value of the point cloud distance in the point cloud map, R is the rotation matrix in the output rotation and translation matrix, and t is the translation vector in the output rotation and translation matrix.
4. The robot automatic charging method according to claim 1, It is characterized in that Before calculating the point cloud error between the point cloud map and different preset reference maps, the method further includes: The robot is docked with different charging piles for charging, and radar images are scanned according to different preset scanning angles to obtain radar point cloud images; For the same charging pile, different radar point cloud images obtained at different preset scanning angles are combined to obtain the preset reference map, and an average value of point cloud distances in different radar point cloud images is obtained; The average values of the point cloud distances in different radar point cloud images are calculated to obtain a reference average value, and the average value between the calculated reference average values is set as the average value of the point cloud distances in the corresponding preset reference map.
5. The robot automatic charging method according to claim 1, It is characterized in that The generating of the charging navigation path comprises: Obtaining the position coordinates of the robot, and calculating the moving distances between the position coordinates and different charging piles; The charging pile corresponding to the minimum moving distance is set as the target charging pile, and the path end point is obtained in the path direction between the target charging pile and the robot, and the distance between the path end point and the charging pile is equal to the preset distance; The charging navigation path is generated according to the coordinates of the path end point and the position coordinates of the robot.
6. The robot automatic charging method according to claim 1, It is characterized in that The step of obtaining a point cloud map of the robot's current environment includes: The end point of the path is taken as the origin, the preset direction is taken as the positive direction, and the robot is controlled to rotate at a preset angle according to a preset angular resolution to perform radar image scanning to obtain a point cloud map of the current environment.
7. The robot automatic charging method according to claim 2, It is characterized in that The step of calculating the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and controlling the robot to perform posture transformation according to the posture transformation parameters, comprises: Obtaining the horizontal transformation parameters, vertical transformation parameters and rotation angle in the output rotation and translation matrix to obtain the posture transformation parameters; The robot is controlled to perform horizontal posture transformation, vertical posture transformation and angular posture transformation according to the horizontal transformation parameter, the vertical transformation parameter and the rotation angle respectively.
8. A robot automatic charging system, It is characterized in that include: A navigation module, configured to generate a charging navigation path if a charging instruction is received, and control the robot to move to a path end point of the charging navigation path according to the charging navigation path; A point cloud map acquisition module, used to acquire a point cloud map of the environment in which the robot is currently located, wherein the point cloud map includes a first data point, and the first data point is a data vector corresponding to an obstacle in the current environment; a point cloud error calculation module, used to calculate the point cloud error between the point cloud map and different preset reference maps, one of the preset reference maps being a point cloud map when the robot is in a charging docking state with a charging pile, the point cloud error being used to characterize the distance error of the average value of the point cloud distance between the point cloud map and the preset reference map, the point cloud distance being used to characterize the distance between an obstacle and a map origin; The posture transformation module is used to calculate the posture transformation parameters between the point cloud map and the preset reference map corresponding to the minimum point cloud error, and control the robot to perform posture transformation according to the posture transformation parameters.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Visual sweeping robot and charger returning method thereof
CN107945233A
Navigation positioning method and device and robot
CN109211236A
Automatic charging method and device as well as terminal equipment
CN109648602A
Robot, automatic recharging method and system thereof, electronic equipment and storage medium
CN109683605A
Robot and automatic control method and device thereof
CN111546333A
Cited By
Multi-level fusion positioning visual robot automatic charging method and device
CN114784911A
