Robot charging method and apparatus, electronic device, and storage medium
By collecting the correspondence between the feature points of the current image and the standard image in the robot, the robot's pose is determined and adjusted, which solves the problem of insufficient positioning accuracy of the navigation module and improves the robot's charging success rate.
Patent Information
- Application Number
- PCT/CN2025/087935
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-09
- Filing Date
- 2025-04-09
- Publication Date
- 2025-10-16
AI Technical Summary
The existing robot charging method has a high probability of charging failure due to the poor positioning accuracy of the navigation module.
The robot collects the correspondence between the feature points in the current image and the pre-stored standard image feature points, determines the relative posture between the robot's current position and the recharging point, and controls the robot to move to the recharging point for charging based on the relative posture.
This improved the success rate of the robot moving to the charging station and reduced charging failures caused by positioning errors.
Smart Images

Figure CN2025087935_16102025_PF_FP_ABST
Abstract
Description
Robot charging method and device, electronic device and storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, and particularly relates to a robot charging method and device, an electronic device and a storage medium. BACKGROUND
[0002] A robot needs to move to a charging pile for charging after completing work or detecting low power, so as to ensure continuous work. SUMMARY
[0003] The present application provides a robot charging method and device, an electronic device and a storage medium, so as to improve the success rate of the robot moving to the charging pile for charging.
[0004] According to an embodiment of the first aspect of the present application, a robot charging method is provided, applied to a robot, and the method comprises the following steps: when it is detected that the robot needs to be charged, moving the robot to a target position and collecting a current image, wherein the current image comprises a target charging pile; determining a relative pose between a current position of the robot and a recharging point position based on a corresponding relationship between one or more first feature points in the current image and one or more second feature points in a standard image, wherein the standard image is an image of the target charging pile collected when the robot is at the recharging point position; and controlling the robot to move to the recharging point position according to the relative pose.
[0005] Optionally, the corresponding relationship between the one or more first feature points in the current image and the one or more second feature points in the standard image is determined by the following steps: for each first feature point, determining a matching score between the first feature point and each second feature point according to a first descriptor corresponding to the first feature point and a second descriptor corresponding to each second feature point, and determining the second feature point with the highest matching score as the second feature point corresponding to the first feature point.
[0006] Optionally, the robot locally pre-stores a standard depth map corresponding to the standard image; and determining the relative pose between the current position of the robot and the position of the recharging point based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image comprises: determining the depth corresponding to each of the second feature points based on the standard depth map; determining the 3D coordinates of the second feature points based on the image coordinates of the second feature points in the standard image and the depths corresponding to the second feature points; and determining the relative pose between the current position of the robot and the position of the recharging point based on the image coordinates of each of the first feature points and the 3D coordinates of the second feature points corresponding to each of the first feature points.
[0007] Optionally, the standard depth map corresponding to the standard image is collected at the same time as the standard image.
[0008] Optionally, determining the relative pose between the current position of the robot and the position of the recharging point based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image comprises: cropping a first sub-image of the target charging pile from the current image, cropping a standard sub-image of the target charging pile from the standard image, and determining the relative pose based on the correspondence between the one or more first feature points in the first sub-image and the one or more second feature points in the standard sub-image.
[0009] Optionally, the method further comprises: if the distance or the angular difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is not within a preset range, re-collecting the current image and returning to perform the step of determining the relative pose between the current position of the robot and the position of the recharging point based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image; and if the distance or the angular difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is within the preset range, determining the position of the robot after the current movement as the position of the recharging point.
[0010] Optionally, detecting that the robot needs to be charged comprises: detecting that the robot has completed a current task; and / or detecting that the remaining power of the robot is less than or equal to a preset threshold.
[0011] According to an embodiment of the second aspect of the present application, a robot charging device is provided, applied to a robot, the device comprising: an acquisition unit configured to control the robot to move to a target position when it is detected that the robot needs to be charged, and acquire a current image, the current image comprising a target charging pile; a determination unit configured to determine a relative pose between a current position of the robot and a recharging point position based on a correspondence relationship between one or more first feature points in the current image and one or more second feature points in a standard image, the standard image being an image of the target charging pile acquired when the robot is at the recharging point position; and a control unit configured to control the robot to move to the recharging point position according to the relative pose.
[0012] Optionally, the determination unit is further configured to: for each first feature point, determine a matching score between the first feature point and each second feature point according to a first descriptor corresponding to the first feature point and second descriptors corresponding to the second feature points, and determine a second feature point with a highest matching score as a second feature point corresponding to the first feature point.
[0013] Optionally, the robot locally pre-stores a standard depth map corresponding to the standard image; and the determination unit is further configured to: determine a depth corresponding to each second feature point based on the standard depth map; determine a 3D coordinate of the second feature point based on an image coordinate of the second feature point in the standard image and the depth corresponding to the second feature point; and determine the relative pose between the current position of the robot and the recharging point position based on an image coordinate of each first feature point and the 3D coordinate of the second feature point corresponding to each first feature point.
[0014] Optionally, the standard depth map corresponding to the standard image is acquired at the same time as the standard image.
[0015] Optionally, the determination unit is further configured to: cut a first sub-image of the target charging pile from the current image, cut a standard sub-image of the target charging pile from the standard image, and determine the relative pose based on a correspondence relationship between one or more first feature points in the first sub-image and one or more second feature points in the standard sub-image.
[0016] Optionally, the control unit is further configured to: if the distance or the angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is not within the preset range, re-collect a current image, and return to perform the step of determining the relative pose between the current position of the robot and the return charging point position based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image; and if the distance or the angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is within the preset range, determine the position of the robot after the current movement as the return charging point position.
[0017] Optionally, the detection that the robot needs to be charged comprises: detecting that the robot has completed a current task; and / or detecting that the remaining power of the robot is less than or equal to a preset threshold.
[0018] According to an embodiment of the third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to the first aspect when executing the computer program.
[0019] According to an embodiment of the fourth aspect of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores computer instructions, and the computer instructions can implement the method according to the first aspect when executed.
[0020] In the embodiments of the present application, the robot locally pre-stores a standard image of a target charging pile collected at a return charging point position. When needing to be charged, the robot first moves to the vicinity of the target charging pile, collects a current image of the target charging pile, determines the relative pose between the current position of the robot and the return charging point position based on the correspondence between the first feature points in the current image and the second feature points in the standard image, and further moves to the return charging point position according to the relative pose. This method is based on the features of the charging pile itself, and calculates the relative pose between the current position of the robot and the return charging point position according to the correspondence between the feature points of the current image and the standard image of the charging pile collected during the return charging process, so as to make the robot move to the return charging point position according to the relative pose, thereby improving the success rate of the robot moving to the charging pile for charging. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0022] FIG. 1 is a flowchart of a robot charging method according to an embodiment of the present application.
[0023] FIG. 2 is a schematic diagram of matching between a first feature point in a current image of a charging pile and a second feature point in a standard image of the charging pile according to an embodiment of the present application.
[0024] FIG. 3 is a schematic diagram of 3D coordinate determination according to an embodiment of the present application.
[0025] FIG. 4 is a schematic diagram of a process of moving a robot to a back charging point position according to a relative pose according to an embodiment of the present application.
[0026] FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
[0027] FIG. 6 is a schematic structural diagram of a robot charging device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] The exemplary embodiments will be described in detail herein below with reference to the accompanying drawings. In the following description, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments are not representative of all embodiments consistent with the present application. Rather, they are merely examples of devices and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0029] The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the present application and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0030] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy. These terms are used merely to distinguish one from another. For example, a first information can be termed a second information, and similarly, a second information can be termed a first information, without departing from the scope of the present application. Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "in response to determining" or "in response to a determination."
[0031] At present, the robot charging method commonly used in the related art is that a charging pile sends a signal, a receiver of the robot receives the signal to position the charging pile, a navigation module of the robot plans a path, and the robot is controlled to move to a position where the charging pile is located according to the planned path to charge. However, due to poor positioning accuracy of the navigation module, the robot charging often fails due to positioning deviation.
[0032] Therefore, the embodiments of the present application provide a robot charging method and device, an electronic device and a storage medium to improve the success rate of the robot moving to the charging pile to charge.
[0033] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0034] Please refer to FIG. 1, which is a flowchart of a robot charging method provided by the embodiments of the present application, wherein the method is applied to a robot.
[0035] In the embodiments, the robot to which the method is applied can be a mobile robot in a smart home device, such as a sweeping robot, a meal delivery robot, a security patrol robot, etc., and the present application does not limit this.
[0036] As shown in FIG. 1, the method can include the following steps 101 to 103.
[0037] In step 101, when it is detected that the robot needs to charge, the robot is controlled to move to a target position, and a current image is collected. The current image involves a target charging pile.
[0038] In the embodiments, the target position can be a specified range corresponding to the target charging pile, such as a range of 50 centimeters from the target charging pile.
[0039] In the embodiments, when it is detected that the robot needs to charge, the robot can be controlled to move into the specified range corresponding to the target charging pile according to the position information of the target charging pile, and the target charging pile can be found by a camera device included in the robot.
[0040] In the embodiments, the camera device included in the robot can include a camera, a fisheye camera, a spherical camera, etc., and the present application does not limit this.
[0041] As an embodiment, the detection that the robot needs to charge includes: detecting that the robot has completed a current task; and / or detecting that the remaining power of the robot is less than or equal to a preset threshold.
[0042] In this embodiment, the robot can be determined to need charging after completing the current task, and be controlled to return to the charging pile for charging. For example, taking a sweeping robot as an example, the sweeping robot can be determined to need charging after completing a preset time or a preset area of cleaning work.
[0043] In this embodiment, the robot can also be determined to need charging when the remaining power of the robot is detected to be less than or equal to a preset threshold. For example, taking a sweeping robot as an example, the sweeping robot can be preset to return to the charging pile for charging when the power is less than or equal to 10%. It is easy to understand that the preset threshold can be set according to the moving range of the robot, for example, the moving range of the robot is larger, and a larger preset threshold needs to be set to avoid the situation that the robot cannot return to the charging pile when the power is low and the distance to the charging pile is too far. The present application does not limit this.
[0044] As an embodiment, the method further comprises: controlling the robot to move to a specified range corresponding to the target charging pile according to the position information of the target charging pile.
[0045] In this embodiment, the robot can plan a path for the robot to move to the target charging pile according to the position information of the target charging pile through the navigation module deployed in the robot. It is easy to understand that since the positioning accuracy of the navigation module is poor, the path planned according to the position information of the target charging pile can only make the robot move to the vicinity of the target charging pile, for example, within a range of 50 centimeters from the target charging pile, at this time, the robot can not be able to move to the target charging pile for charging due to large positioning error.
[0046] As an embodiment, the method further comprises: triggering the camera device included in the robot to search for the target charging pile when a message that the robot has moved to the specified range is received; the message is sent by the navigation module when it is detected that the robot has moved to the specified range.
[0047] In this embodiment, after the robot moves to the specified range corresponding to the target charging pile according to the path planned by the navigation module, the camera device included in the robot is used to search for the target charging pile. Specifically, after the robot moves to the end point of the path according to the planned path, the navigation module sends a message that the movement has been completed to the robot, and after the robot receives the message, the camera device is controlled to start working to search for whether the target charging pile exists.
[0048] In this embodiment, when the target charging pile is found by the camera device, the current image of the target charging pile is intercepted.
[0049] In this embodiment, if the target charging pile is not in the lens of the camera device, the robot can be controlled to rotate in place for one round to determine whether the target charging pile is in other directions of the camera device lens. If the target charging pile is still not found, the step of path planning by the navigation module according to the position information of the target charging pile in step 101 can be repeated, and the robot can be controlled to move again and then find the target charging pile again.
[0050] In step 102, the relative pose between the current position of the robot and the position of the recharging point is determined based on the correspondence between the first feature points in the current image and the second feature points in the standard image.
[0051] The standard image is an image of the target charging pile collected when the robot is at the position of the recharging point. The pose includes position and attitude. The position can be represented by coordinates, and the attitude refers to direction or orientation, which is used to describe the rotational state of an object.
[0052] As an example, the standard image can be an image taken by facing the target charging pile directly at the recharging point position of the robot with the perspective of the robot.
[0053] In this embodiment, the recharging point is a point within the preset range of the charging pile, and the robot can automatically complete homing and charging after reaching the recharging point. Taking a sweeping robot as an example, the recharging point can be a point located in front of the charging pile within a range of, for example, 20 centimeters from the charging pile. After reaching the recharging point, the sweeping robot will automatically rotate to face away from the charging pile and then retreat into the charging pile for charging.
[0054] In this embodiment, the second feature points in the standard image and the descriptors corresponding to the second feature points can be extracted by a model. The descriptors are used to represent the features of the second feature points. Further, the first feature points in the current image and the descriptors corresponding to the first feature points can be extracted by the same model. It is easy to understand that the extracted first feature points can be one or more, and the extracted second feature points can be one or more.
[0055] As an example, the correspondence between the first feature points in the current image and the second feature points in the standard image is determined by the following steps: for each first feature point, the matching scores between the first feature point and each second feature point are determined according to the first descriptor corresponding to the first feature point and the second descriptors corresponding to the second feature points, and the second feature point with the highest matching score is determined as the second feature point corresponding to the first feature point.
[0056] In the embodiment, for each first feature point, a matching score between the first descriptor of the first feature point and the second descriptor of each second feature point can be calculated, and the higher the matching score is, the more likely the second feature point corresponds to the first feature point. The second feature point corresponding to the descriptor with the highest matching score can be determined as the second feature point corresponding to the first feature point, so that the corresponding second feature point for each first feature point is found.
[0057] In the embodiment, the standard image can also be a sub-image of the target charging pile cut from the image of the target charging pile captured when the robot is at the return charging point position. In this case, determining the relative pose between the current position of the robot and the return charging point position based on the correspondence between the first feature points in the current image and the second feature points in the standard image includes: cutting a first sub-image of the target charging pile from the current image, cutting a standard sub-image of the target charging pile from the standard image, and determining the relative pose based on the correspondence between the first feature points in the first sub-image and the second feature points in the standard sub-image.
[0058] In the embodiment, the current image can be selected according to the standard image. If the standard image is a sub-image of the target charging pile cut from the image of the target charging pile captured when the robot is at the return charging point position, after the target charging pile is found in the lens of the camera device, a first sub-image of the target charging pile can be cut from an image with the target charging pile as the current image. Such a sub-image obtained by cutting a target (for example, the target charging pile herein) from an image can be referred to as a Region of Interest (ROI) image. The process of detecting and / or cutting the target charging pile can be implemented by a YOLO (You Only Look Once) v5 target detection algorithm, which is not limited in the present application.
[0059] In the embodiment, the feature points in the standard image and the current image can be detected by a neural network model such as the SuperPoint model, and the feature points in the current image and the feature points in the standard image can be matched by a neural network model such as the SuperGlue model, which is not limited in the present application.
[0060] The matching method between the first feature points in the current image and the second feature points in the standard image proposed in the embodiment of the present application will be introduced below in combination with FIG. 2.
[0061] Referring to FIG. 2, FIG. 2 is a schematic diagram of matching between a first feature point in a current image and a second feature point in a standard image, which can be performed using a SuperGlue model.
[0062] As shown in FIG. 2, the left graph Q is a current image (for example, an ROI image) obtained by the robot during movement, and the right graph P is a standard image, that is, an image taken by the robot facing the target charging pile at a recharging point of the robot in the perspective of the robot. The nine points in the graphs are feature points extracted. The matching scores between the descriptors of the feature points in the graph P and the descriptors of the feature points in the graph Q can be calculated, and the feature points corresponding to the descriptor pair with the highest matching score are determined as a pair of corresponding feature points.
[0063] As an example, the graph P has M feature points, which are P1-P M The corresponding descriptor vectors are Each descriptor vector is a 256-dimensional floating-point vector. Similarly, the graph Q has N feature points, and the corresponding descriptor vectors are Each descriptor vector is also a 256-dimensional floating-point vector.
[0064] Further, the cosine similarity between the descriptor vectors corresponding to the feature points in the graph P and the descriptor vectors corresponding to the feature points in the graph Q can be calculated, and the cosine similarity is taken as the matching score. The feature points corresponding to the descriptor vector with the highest matching score are output as a matching pair. The cosine similarity between the descriptor vectors can be calculated by the following formula:
[0065] wherein S i,j represents the cosine similarity between the descriptor vector corresponding to the feature point P i and the descriptor vector corresponding to the feature point Q j.
[0066] The matching relationship between the feature points of the graph P and the graph Q can be obtained end-to-end by a deep learning network SuperGlue. That is, the feature points and descriptor vectors of the graph P and the graph Q are input into the SuperGlue, and a one-to-one matching relationship can be obtained.
[0067] After matching, the nine feature points in the graph Q and the nine feature points in the graph P are one-to-one corresponding according to the dashed lines shown in the graphs, and the matching between the first feature point in the current image and the second feature point in the standard image is completed.
[0068] In the embodiment, the number of the first feature points in the current image and the second feature points in the standard image is not limited to nine, and can be selected according to actual conditions. The application does not limit this.
[0069] As an embodiment, the feature points in the standard image can be predetermined and stored in the robot; the standard image is pre-shot by the robot and stored locally; or the standard image is pre-shot by an external camera device and sent to the robot for storage.
[0070] In the embodiment, the standard image is usually an image stored in the robot when the robot is shipped. If the robot is not equipped with the standard image when it is shipped, the standard image can be pre-shot by an external camera device and sent to the robot for storage. Meanwhile, the feature points in the standard image can be extracted from the standard image after the current image is determined, or can be extracted by a neural network model and stored in the robot for direct acquisition when needed. The application does not limit this.
[0071] In the embodiment, the robot locally pre-stores a standard depth map corresponding to the standard image; and determining the relative pose between the current position of the robot and the return charging point position based on the correspondence between the first feature points in the current image and the second feature points in the standard image comprises: determining the depth corresponding to each second feature point based on the standard depth map; determining the 3D coordinates of the second feature point based on the image coordinates of the second feature point in the standard image and the depth corresponding to the second feature point; and determining the relative pose between the current position of the robot and the return charging point position based on the image coordinates of each first feature point and the 3D coordinates of the second feature point corresponding to each first feature point.
[0072] In the embodiment, the standard depth map corresponding to the standard image can be collected at the same time as the standard image. In addition to storing the standard image, the robot will also store a standard depth map corresponding to the standard image when it is shipped. The standard depth map identifies the depth of each point in the standard image, that is, the depth of the feature points in the standard image can be obtained from the standard depth map, so as to obtain the 3D coordinates of each second feature point.
[0073] Further, the relative pose between the current position of the robot and the return charging point position can be determined based on the image coordinates of each first feature point and the 3D coordinates of the second feature point corresponding to each first feature point.
[0074] As an embodiment, a 3D-2D PNP (Perspective-n-Point) algorithm can be used to solve the relative pose between the current position of the robot and the recharging point position, and the application does not make any limitation in this regard. The 3D-2D PNP algorithm is a commonly used algorithm in the related art, and will not be described here.
[0075] The 3D coordinate determination method proposed in the embodiment of the application will be described below in conjunction with FIG. 3.
[0076] Please refer to FIG. 3, which is a 3D coordinate determination diagram provided by the embodiment of the application.
[0077] As shown in FIG. 3, the Depth image on the left upper side is a standard image, i.e., the standard depth image of the lower left side image P. The depth of the feature points in image P can be determined through the standard depth image, i.e., the value of the y coordinate in the right side image, and then the 3D coordinates of the feature points in image P can be calculated according to the camera imaging principle.
[0078] In step 103, the robot is controlled to move to the recharging point position according to the relative pose.
[0079] In this embodiment, the robot is controlled to move to the recharging point position according to the relative pose determined in step 102, and after the movement is completed, the robot reaches the recharging point position or its vicinity.
[0080] As an embodiment, after the robot is controlled to move to the recharging point position according to the relative pose, the method further includes: if the distance or the angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is not within a preset range, the current image is reacquired, and the step of determining the relative pose between the current position of the robot and the recharging point position based on the corresponding relationship between the first feature points in the current image and the second feature points in the standard image is executed again; if the distance or the angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is within the preset range, the position of the robot after the current movement is determined as the recharging point position.
[0081] As an embodiment, in order to determine whether the distance or the angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is within a preset range, it can be assumed that the position of the robot after the last movement is P prev =(x prev ,y prev ,θ prev ), and the position of the robot after the current movement is P cur =(x cur ,ycur , θ cur ), wherein x represents the coordinate of the robot in the X direction, y represents the coordinate of the robot in the Y direction, and θ represents the orientation angle of the robot. The angle difference Δθ and the distance d between the position of the robot after this movement and the position of the robot after the last movement can be calculated according to the following formula: Δθ = θ cur - θ prev
[0082] The preset distance threshold and the angle difference threshold are d max , θ max , for example, d max = 1 cm and θ max = 1°. If Δθ > d max or d > d max , it is considered that the distance or the angle difference between the position of the robot after this movement and the position of the robot after the last movement according to the relative pose is not within the preset range, and the current image needs to be re-acquired.
[0083] In this embodiment, there may be some errors in the process of feature point extraction and / or feature point matching in the process of executing the method, resulting in errors in the determined relative pose, and finally resulting in a long distance between the position of the robot after movement and the position of the recharging point. At this time, the charging process of the robot cannot be completed.
[0084] In view of this, after controlling the robot to move to the recharging point position, the position of the robot after movement can be recorded and compared with the position of the robot after the last movement. If it is found that the position of the robot after this movement is far away from the position of the robot after the last movement, for example, more than 1 cm, it is determined that an error occurs when the scheme of this embodiment is executed. At this time, the step of searching for the target charging pile by the camera device can be returned, the relative pose is determined again, the robot is controlled to move according to the relative pose, and the distance between the position of the robot after this movement and the position of the robot after the last movement according to the relative pose is small, for example, within 1 cm. At this time, it can be considered that the robot has reached the recharging point position.
[0085] The process of controlling the robot to move to the recharging point position according to the relative pose proposed in the present application will be introduced below with reference to FIG. 4.
[0086] Please refer to FIG. 4, which is a process diagram of controlling the robot to move to the recharging point position according to the relative pose provided in the embodiment of the present application.
[0087] As shown in FIG. 4, P represents the back charging point position, Q represents the current position of the robot, and E represents the relative pose. In this embodiment, the robot can move from Q to P according to the relative pose E to complete a movement to the back charging point position. The directions indicated by the arrows in FIG. 4 respectively indicate the front direction of the robot.
[0088] In this embodiment, after the robot reaches the back charging point position, the robot returns to the charging pile for charging by itself, which is commonly used in the related art and will not be described here.
[0089] In this embodiment, the robot locally pre-stores a standard image of the target charging pile collected at the back charging point position. When charging is needed, the robot first moves to the vicinity of the target charging pile, collects a current image of the target charging pile, determines the relative pose between the current position of the robot and the back charging point position based on the correspondence between the first feature points in the current image and the second feature points in the standard image, and further moves to the back charging point position according to the relative pose. This method is based on the features of the charging pile itself, and calculates the relative pose between the current position of the robot and the back charging point position according to the correspondence between the feature points of the current image and the standard image of the charging pile collected during the return charging process, so as to make the robot move to the back charging point position according to the relative pose, thereby improving the success rate of the robot moving to the charging pile for charging.
[0090] Please refer to FIG. 5, which is a schematic structural diagram of an electronic device according to an embodiment of the present application. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course can also include other hardware required by the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs, and forms a terminal interaction device at the logical level. Of course, in addition to the software implementation, the present application does not exclude other implementation manners, such as logic devices or a combination of software and hardware, etc. That is, the execution subject of the following processing flow is not limited to each logical unit, but can also be hardware or a logic device.
[0091] Please refer to FIG. 6, which is a schematic structural diagram of a robot charging device according to an embodiment of the present application. The device is applied to a robot. As shown in FIG. 6, the robot charging device can include an acquisition unit 601, a determination unit 602, and a control unit 603.
[0092] The acquisition unit 601 is configured to, when detecting that the robot needs to be charged, control the robot to move to a target position and acquire a current image, the current image including a target charging pile.
[0093] The determining unit 602 is configured to determine a relative pose between the current position of the robot and the position of the recharging point based on a correspondence relationship between the first feature points in the current image and the second feature points in the standard image; the standard image is an image of the target charging pile captured when the robot is at the position of the recharging point.
[0094] The control unit 603 is configured to control the robot to move to the position of the recharging point according to the relative pose.
[0095] Optionally, the determining unit 602 is further configured to, for each first feature point, determine a matching score between the first feature point and each second feature point according to a first descriptor corresponding to the first feature point and second descriptors corresponding to the second feature points, and determine the second feature point with the highest matching score as the second feature point corresponding to the first feature point.
[0096] The robot locally pre-stores a standard depth map corresponding to the standard image; the determining unit 602 is further configured to determine a depth corresponding to each second feature point based on the standard depth map, determine a 3D coordinate of the second feature point based on an image coordinate of the second feature point in the standard image and the depth corresponding to the second feature point, and determine the relative pose between the current position of the robot and the position of the recharging point based on an image coordinate of each first feature point and the 3D coordinate of the second feature point corresponding to each first feature point.
[0097] The standard depth map corresponding to the standard image is captured at the same time as the standard image.
[0098] The standard image is a sub-image of the target charging pile cut from an image of the target charging pile captured when the robot is at the position of the recharging point. In this case, the determining unit 602 is further configured to cut a first sub-image of the target charging pile from the current image, cut a standard sub-image of the target charging pile from the standard image, and determine the relative pose based on a correspondence relationship between the first feature points in the first sub-image and the second feature points in the standard sub-image.
[0099] The control unit 603 is further configured to, if a distance or an angle difference between a position of the robot after the current movement and a position of the robot after the last movement according to the relative pose is not within a preset range, re-capture the current image and return to perform the step of determining the relative pose between the current position of the robot and the position of the recharging point based on a correspondence relationship between the first feature points in the current image and the second feature points in the standard image; and if the distance or the angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative pose is within the preset range, determine the position of the robot after the current movement as the position of the recharging point.
[0100] The detecting that the robot needs to be charged includes: detecting that the robot has completed a current task; and / or, detecting that a remaining power of the robot is less than or equal to a preset threshold.
[0101] Correspondingly, the embodiment of the present application further provides a computer readable storage medium, wherein a plurality of computer instructions are stored on the computer readable storage medium, and the computer instructions can realize the robot charging method disclosed in the above embodiment of the present application when executed.
[0102] Exemplarily, the computer readable storage medium can be any electronic, magnetic, optical, or other physical storage apparatus, and can contain or store information such as executable instructions, data, and the like. For example, the computer readable storage medium can be a RAM (Random Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as a hard disk drive), a solid state drive, any type of storage disc (such as an optical disc, a DVD, and the like), or similar storage medium, or a combination thereof.
[0103] The system, device, module or unit illustrated in the above embodiments can be specifically implemented by an entity or a product with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0104] For the convenience of description, the above device is described as various units respectively by functions. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware in the implementation of the present application.
[0105] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to a magnetic disk storage, a CD-ROM, an optical storage, and the like) containing computer usable program codes.
[0106] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks.
[0107] Also, these computer program instructions can be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks.
[0108] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks.
[0109] The above description is only some embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the present application.
Claims
1. A robot charging method, applied to a robot, the method comprising: When detecting that the robot needs to be charged, controlling the robot to move to a target position and capturing a current image, wherein the current image includes a target charging pile; Determining a relative pose between the current position of the robot and a recharging point location based on a correspondence between one or more first feature points in the current image and one or more second feature points in a standard image; wherein the standard image is an image of the target charging pile captured when the robot is at the recharging point location; According to the relative posture, the robot is controlled to move toward the recharging point.
2. The method according to claim 1, characterized in that The correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image is determined by the following steps: For each of the first feature points, the matching score between the first feature point and each of the second feature points is determined based on the first descriptor corresponding to the first feature point and the second descriptor corresponding to each of the second feature points, and the second feature point with the highest matching score is determined as the second feature point corresponding to the first feature point.
3. The method according to claim 1 or 2, characterized in that The robot pre-stores a standard depth map corresponding to the standard image locally; The determining, based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image, a relative pose between the current position of the robot and the recharging point position, includes: Determine the depth corresponding to each of the second feature points based on the standard depth map; determining the 3D coordinates of the second feature point based on the image coordinates of the second feature point in the standard image and the depth corresponding to the second feature point; Based on the image coordinates of each of the first feature points and the 3D coordinates of the second feature point corresponding to each of the first feature points, a relative posture between the current position of the robot and the recharging point position is determined.
4. The method according to claim 3, characterized in that The standard depth map corresponding to the standard image is collected simultaneously with the standard image.
5. The method according to any one of claims 1 to 4, characterized in that The determining, based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image, a relative pose between the current position of the robot and the recharging point position, includes: A first sub-image of the target charging pile is captured from the current image, and a standard sub-image of the target charging pile is captured from the standard image. The relative posture is determined based on the correspondence between one or more first feature points in the first sub-image and one or more second feature points in the standard sub-image.
6. The method according to any one of claims 1 to 5, further comprising: If the distance or angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative posture is not within a preset range, re-capturing the current image and returning to the step of determining the relative posture between the current position of the robot and the recharging point position based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image; If the distance or angle difference between the position of the robot after this movement and the position of the robot after the last movement according to the relative posture is within the preset range, the position of the robot after this movement is determined as the recharging point position.
7. The method according to any one of claims 1 to 6, characterized in that The detecting that the robot needs to be charged includes: Detecting that the robot has completed the current task; and / or It is detected that the remaining power of the robot is less than or equal to a preset threshold.
8. A robot charging device, applied to a robot, comprising: an acquisition unit, configured to control the robot to move to a target position and acquire a current image when detecting that the robot needs to be charged, wherein the current image includes a target charging pile; a determination unit, configured to determine a relative pose between the current position of the robot and a recharging point location based on a correspondence between one or more first feature points in the current image and one or more second feature points in a standard image; wherein the standard image is an image of the target charging pile captured when the robot is at the recharging point location; A control unit is used to control the robot to move toward the recharging point according to the relative posture.
9. The device according to claim 8, characterized in that The determining unit is further configured to: For each of the first feature points, the matching score between the first feature point and each of the second feature points is determined based on the first descriptor corresponding to the first feature point and the second descriptor corresponding to each of the second feature points, and the second feature point with the highest matching score is determined as the second feature point corresponding to the first feature point.
10. The device according to claim 8 or 9, characterized in that The robot pre-stores a standard depth map corresponding to the standard image locally; The determining unit is further configured to: Determine the depth corresponding to each of the second feature points based on the standard depth map; determining the 3D coordinates of the second feature point based on the image coordinates of the second feature point in the standard image and the depth corresponding to the second feature point; Based on the image coordinates of each of the first feature points and the 3D coordinates of the second feature point corresponding to each of the first feature points, a relative posture between the current position of the robot and the recharging point position is determined.
11. The device according to claim 10, characterized in that The standard depth map corresponding to the standard image is collected simultaneously with the standard image.
12. The device according to any one of claims 8 to 11, characterized in that The determining unit is further configured to: A first sub-image of the target charging pile is captured from the current image, and a standard sub-image of the target charging pile is captured from the standard image. The relative posture is determined based on the correspondence between one or more first feature points in the first sub-image and one or more second feature points in the standard sub-image.
13. The device according to any one of claims 8 to 12, characterized in that The control unit is further configured to: If the distance or angle difference between the position of the robot after the current movement and the position of the robot after the last movement according to the relative posture is not within a preset range, re-capturing the current image and returning to the step of determining the relative posture between the current position of the robot and the recharging point position based on the correspondence between the one or more first feature points in the current image and the one or more second feature points in the standard image; If the distance or angle difference between the position of the robot after this movement and the position of the robot after the last movement according to the relative posture is within the preset range, the position of the robot after this movement is determined as the recharging point position.
14. The device according to any one of claims 8 to 13, characterized in that The detecting that the robot needs to be charged includes: Detecting that the robot has completed the current task; and / or It is detected that the remaining power of the robot is less than or equal to a preset threshold.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented. 16 . A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed, can implement the method according to claim 1 .
Citation Information
Patent Citations
Automatic charging system and method
CN107618396A
Charging interface identification and positioning method and system
CN107728621A
Method and device for obtaining posture and storage medium
CN109166150A
Photographing prompting method and device and electronic equipment
CN111654624A
Charging port pose estimation method and system, charging robot and storage medium
CN113628275A