Robot charging method, robot, storage medium and computer program product
By obtaining and analyzing robot scheduling information, priority is given to the robots that are urgently charged for charging, solving the conflict problem caused by insufficient charging piles, improving work efficiency and reducing costs.
Patent Information
- Application Number
- CN202211575816.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-12-09
AI Technical Summary
In traditional technology, when the number of robot charging piles is insufficient, multiple robots go to the same charging pile to charge, resulting in a return charge conflict, affecting work efficiency.
By obtaining the dispatch information of all robots, generating a list of identification numbers to be charged and a list of charging decisions, prioritizing the charging robots with high urgency to charge, avoid conflicts, and using the working environment map to intelligently select charging piles.
It improves the average continuous working time of the robot, avoids recharge conflicts, reduces costs, and realizes distributed charging decisions without the need for central decision nodes.
Smart Images

Figure CN116191590B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a robot charging method, a robot, a storage medium, and a computer program product. Background Art
[0002] With the development of artificial intelligence technology, robots are widely used in catering, factories, hotels and other scenarios. In order to ensure the continuous normal operation of robots, robots need to automatically go to charging piles for charging when the battery is low. In traditional technology, when the number of charging piles is less than the number of robots, multiple robots may go to the same charging pile to charge, resulting in charging conflicts, causing the robots to fail to work properly and affecting their work efficiency. Summary of the invention
[0003] Based on this, it is necessary to provide a robot charging method, device, robot, computer-readable storage medium and computer program product that can improve the robot's working efficiency in response to the above-mentioned technical problems.
[0004] In the first aspect, the present application provides a charging method for a robot. The charging method is applied to a robot, and the robot includes a mobile chassis, a communication module, an automatic recharging module, a memory, and a processor; the mobile chassis is used to drive the robot to move autonomously, the communication module is used to realize communication between the robot and other robots, the automatic recharging module is used to realize the automatic recharging function of the robot, the memory stores the robot's operating environment map, and the operating environment map stores the location information of each charging pile; the charging method includes:
[0005] When the current robot is in the charging ready state, the scheduling information of all robots is obtained;
[0006] Generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching each of the to-be-charged identifiers;
[0007] If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging;
[0008] If the list of identifications to be charged contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification for automatic recharging according to the working environment map.
[0009] In a second aspect, the present application also provides a charging device for a robot. The device comprises:
[0010] An acquisition module, used to acquire the scheduling information of all robots when the current robot is in a charging ready state;
[0011] A generating module, configured to generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching the to-be-charged identifiers;
[0012] A charging module, configured to cause the current robot to give up charging if the list of to-be-charged identifiers does not contain the identifier of the current robot;
[0013] The charging module is also used to search for the target charging pile identifier in the charging decision list according to the identifier of the current robot if the list of identifiers to be charged contains the identifier of the current robot, and control the current robot to go to the charging pile corresponding to the target charging pile identifier for automatic recharging according to the working environment map.
[0014] In the third aspect, the present application also provides a robot. The robot includes a mobile chassis, a communication module, an automatic recharging module, a memory, and a processor; the mobile chassis is used to drive the robot to move autonomously, the communication module is used to realize communication between the robot and other robots, the automatic recharging module is used to realize the automatic recharging function of the robot, the memory stores the robot's operating environment map, and the operating environment map stores the location information of each charging pile; the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0015] When the current robot is in the charging ready state, the scheduling information of all robots is obtained;
[0016] Generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching each of the to-be-charged identifiers;
[0017] If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging;
[0018] If the list of identifications to be charged contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification for automatic recharging according to the working environment map.
[0019] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0020] When the current robot is in the charging state, re-obtain the scheduling information of all robots;
[0021] Based on the re-acquired scheduling information, a list of available charging pile identifiers is generated;
[0022] If the list of available charging pile identifiers contains the charging pile identifier used by the current robot, the current robot stops charging.
[0023] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0024] Get the recharge capacity threshold, last charging decision time and recharge waiting time;
[0025] If the current power level is less than or equal to the recharge power threshold, and the current time is greater than or equal to the sum of the previous charging decision time and the recharge waiting time, it is determined that the current robot meets the charging conditions and the state of the current robot is adjusted to a charging ready state.
[0026] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0027] Obtain a list of candidate robot identifiers and a list of candidate charging piles;
[0028] The candidate robot identification list is traversed, and when the target robot identification in the candidate robot identification list is traversed, a first remaining power corresponding to the target robot identification and a second remaining power corresponding to the target charging pile identification in the candidate charging pile list are extracted from the scheduling information;
[0029] If the first remaining power and the second remaining power meet the power condition, the target robot identifier is added to the first preset list, and the target charging pile identifier is added to the second preset list;
[0030] When the candidate robot identification list is traversed, the obtained first preset list is determined as the list of identifications to be charged, and the obtained second preset list is determined as the list of identifications of available charging piles;
[0031] A charging decision list is generated based on the list of to-be-charged identifications and the list of available charging pile identifications.
[0032] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0033] Get the initial robot identification list and initial charging pile list;
[0034] sorting the robot identifiers in the initial robot identifier list based on the surplus power corresponding to each robot in the initial robot identifier list to obtain the candidate robot identifier list;
[0035] The charging pile identifiers in the initial charging pile list are sorted based on the surplus electricity corresponding to each charging pile in the initial charging pile list to obtain the candidate charging pile list.
[0036] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0037] Traversing the list of to-be-charged identifiers, when traversing to a target to-be-charged identifier in the list of to-be-charged identifiers, obtaining a pre-selected charging pile identifier corresponding to the target to-be-charged identifier;
[0038] If the list of available charging pile identifiers includes the pre-selected charging pile identifier, add the target to-be-charged identifier and the pre-selected charging pile identifier to a third preset list, delete the target to-be-charged identifier from the to-be-charged identifier list, and delete the pre-selected charging pile identifier from the list of available charging pile identifiers;
[0039] When the traversal of the list of to-be-charged identifiers is completed, the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles are formed into matching pairs;
[0040] The matching pairs are added to the third preset list to obtain a charging decision list.
[0041] In one embodiment, in one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0042] When the list of to-be-charged identifiers is traversed, the distance between the robot corresponding to the remaining to-be-charged identifier and the charging pile corresponding to the remaining charging pile identifier is determined based on the scheduling information;
[0043] The remaining identifiers and the remaining charging pile identifiers are matched into a pair based on the distance.
[0044] In a fourth aspect, the present application further provides 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 following steps are implemented:
[0045] When the current robot is in the charging ready state, the scheduling information of all robots is obtained;
[0046] Generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching each of the to-be-charged identifiers;
[0047] If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging;
[0048] If the list of identifications to be charged contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification for automatic recharging according to the working environment map.
[0049] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0050] When the current robot is in the charging ready state, the scheduling information of all robots is obtained;
[0051] Generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching each of the to-be-charged identifiers;
[0052] If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging;
[0053] If the list of identifications to be charged contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification for automatic recharging according to the working environment map.
[0054] The charging method, device, robot, storage medium and computer program product of the above robot, when the current robot is in the charging preparation state, obtains the scheduling information of all robots, so that the scheduling information of each robot can be used to comprehensively make charging decisions, so that each robot can reach a consensus. Based on the scheduling information, a list of to-be-charged identifications and a charging decision list are generated, the list of to-be-charged identifications contains the identifications of the robots that need to be charged, and the charging decision list contains the to-be-charged identifications and the charging pile identifications that match each to-be-charged identification. If the to-be-charged identification list does not contain the identification of the current robot, it means that the charging urgency of the current robot is less than that of other robots, and charging can be temporarily suspended, so the current robot gives up charging; if the to-be-charged identification list contains the identification of the current robot, it means that the charging urgency of the current robot is higher, and the current robot needs to be arranged for charging first, so according to the identification of the current robot, the target charging pile identification is searched in the charging decision list, and the current robot is controlled to go to the target charging pile identification according to the working environment map for automatic recharging. The current robot makes charging decisions based on its own and other robots' scheduling information, and intelligently selects the robot to be charged, which can avoid the recharging conflict problem between multiple robots, improve the average continuous working time of each robot, and thus improve work efficiency. Moreover, each robot can obtain the scheduling information of other robots and make decisions only by using its own IoT communication unit. This is a distributed scheduling method, and a consistent charging decision can be reached without deploying a unified central decision-making node, thus reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A diagram showing an application environment of a charging method for a robot in one embodiment;
[0056] Figure 2 is a schematic flow chart of a charging method for a robot in one embodiment;
[0057] Figure 3 It is a flowchart of a method for generating a list of available charging pile identifiers and a charging decision list in one embodiment;
[0058] Figure 4 It is a flowchart of a charging decision list generating method in one embodiment;
[0059] Figure 5 is a schematic flow chart of a charging method for a robot in another embodiment;
[0060] Figure 6 is a schematic flow chart of a charging method for a robot in yet another embodiment;
[0061] Figure 7 is a structural block diagram of a charging device for a robot in one embodiment;
[0062] Figure 8 is a structural block diagram of a charging device for a robot in another embodiment;
[0063] Fig. 9 1 is a diagram showing the internal structure of a robot in one embodiment. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0065] The robot charging method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, robot A102 communicates with other robots 104 (robot 1, robot 2, robot 3... robot n) through the network. When robot A102 is in the charging preparation state, it obtains the scheduling information of all robots (robot A102 and other robots 104); generates a list of to-be-charged identifications and a charging decision list based on the scheduling information; the charging decision list contains to-be-charged identifications and charging pile identifications that match each to-be-charged identification; if the to-be-charged identification list does not contain the identification of the current robot, charging is abandoned; if the to-be-charged identification list contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and charging is performed based on the target charging pile identification. Among them, robot A102 and other robots 104 can be, but are not limited to, various delivery robots, sweeping robots, food delivery robots, service robots, navigation robots, or operation robots, etc. The robot includes a mobile chassis, a communication module, an automatic recharging module, a memory and a processor; the mobile chassis is used to drive the robot to move autonomously, the communication module is used to realize the communication between the robot and other robots, the automatic recharging module is used to realize the automatic recharging function of the robot, and the memory stores the robot's operating environment map, and the operating environment map stores the location information of each charging pile. The robot has the ability to communicate with each other within a certain distance, and the robots can communicate with each other through the network to obtain the scheduling information of other robots. Secondly, the robot can store the operating environment map, which contains multiple pre-set target points, which can be charging piles, operating points, distribution points, food outlets, etc. The robot can move autonomously in the operating environment according to the operating environment map and reach the target point in the operating environment map. Thirdly, the robot has basic automatic recharging capabilities, that is, when the robot arrives at the charging pile, it can autonomously complete the pile and start charging, and can also automatically detach from the charging pile when necessary and terminate charging. In addition, the robot can detect its current remaining power, detect whether it is charging, and estimate the remaining charging time. There are n (n is a positive integer greater than or equal to 1) robots in the robot's working environment. The n robots share m (m is a positive integer greater than or equal to 1, and m < n) charging piles. The positions of the m charging piles are stored in the working environment map. Assuming that the robots can communicate normally when they are within L meters of each other, the maximum distance between two charging piles is set to D < L. To ensure the efficiency of the robot entering the pile, D < L / 2 can be set.
[0066] In one embodiment, Figure 2 As shown, a charging method for a robot is provided, and the method is applied to Figure 1 The robot in the example is used to illustrate the following steps:
[0067] S202, when the current state of the robot is a charging ready state, obtaining the scheduling information of all robots.
[0068] Among them, the charging preparation state is the state of preparing to go to the charging pile for charging. The current robot can judge whether to charge at regular intervals. If it is determined that charging is required, it is adjusted to the charging preparation state. The scheduling information is information used to schedule the charging behavior of each robot, including the robot's identification, status, current remaining power, warning power threshold, current position or currently selected charging pile identification. The robot's status includes charging preparation state, charging state or charging completion state. The current position is the position of the robot in the working environment map, which can be expressed by position coordinates.
[0069] In one embodiment, each robot broadcasts its own scheduling information, and the current robot can obtain the scheduling information of other robots through the network. For example, the robot can obtain the scheduling information of other robots through Wi-Fi (Wireless Fidelity, wireless local area network), Bluetooth or Internet of Things networks, and obtain the scheduling information of all robots in the current working environment. Each robot broadcasts scheduling information to enable other robots to make charging decisions based on the received scheduling information. The decision-making process does not need to go through a unified central decision-making node. When the robot can only communicate over short distances, a consistent charging decision can be reached, which expands the application scenarios of the robot.
[0070] S204, generating a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes the to-be-charged identifiers and the charging pile identifiers matching the to-be-charged identifiers.
[0071] Among them, the list of to-be-charged identifications is a list for storing the to-be-charged identifications of robots to be charged. The robots to be charged are robots that need to be charged by making comprehensive decisions on each robot based on scheduling information. The to-be-charged identification is the identification of the robot to be charged, and may include at least one of numbers, letters, characters or characteristic symbols. For example, the to-be-charged identification is M-001. The charging pile identification is the identification of the charging pile in the robot's operating environment, and may include at least one of numbers, letters, characters or characteristic symbols. The charging decision list is a list containing to-be-charged identifications and matching charging pile identifications. In one embodiment, the charging decision list contains a key-value pair consisting of the to-be-charged identification as the key and the charging pile identification as the value.
[0072] Since the scheduling information contains the location, power level, and status of each robot, the current robot can make a comprehensive decision based on the scheduling information, identify the robot with the highest urgency to charge as the robot to be charged, and write the ID of the robot to be charged into the list of IDs to be charged. Then, a charging pile is assigned to each robot to be charged, and the ID of the charging pile assigned to each robot to be charged and the ID of the robot to be charged are written into the charging decision list. When the number of charging piles is less than the number of robots, the robot to be charged is given priority for charging.
[0073] S206: If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging.
[0074] If the list of pending charging marks does not contain the current robot's mark, it means that based on the comprehensive decision of the scheduling information, it is determined that the current robot's charging urgency is lower than that of other robots, and charging can be postponed to give priority to other robots. Therefore, if the current robot is in the charging preparation state, and the list of pending charging marks does not contain the current robot's mark, it will give up charging and return to continue working, and decide whether to charge after a period of time.
[0075] S208, if the list of identifications to be charged contains the identification of the current robot, search for the identification of the target charging pile in the charging decision list according to the identification of the current robot, and control the current robot to go to the charging pile corresponding to the identification of the target charging pile for automatic recharging according to the operating environment map.
[0076] If the list of pending charging identifiers contains the current robot's identifier, it means that based on the comprehensive decision of the scheduling information, it is determined that the current robot has a high urgency to charge and needs to be charged. Since the charging decision list contains the identifiers of the charging piles assigned to each robot that needs to be charged, the target charging pile identifier assigned to the current robot can be found in the charging decision list according to the current robot's identifier, and the current robot can be controlled to go to the charging pile corresponding to the target charging pile identifier according to the operating environment map for automatic recharging.
[0077] In one embodiment, S208 specifically includes: if the list of identifications to be charged contains the identification of the current robot, searching for the identification of the target charging pile in the charging decision list according to the identification of the current robot; if the identification of the target charging pile is inconsistent with the identification of the pre-selected charging pile that the current robot expects to go to, adjusting the charging pile that the desired charging pile to go to to the charging pile corresponding to the identification of the target charging pile, and moving to the charging pile corresponding to the identification of the target charging pile for charging.
[0078] The pre-selected charging pile identifier is the identifier of the charging pile pre-selected by the robot. For example, the pre-selected charging pile identifier may be the charging pile selected from all charging piles when the current robot is in the charging preparation state. For example, the pre-selected charging pile identifier may be a charging pile identifier selected randomly or according to the size of the charging pile serial number.
[0079] If the target charging pile logo is inconsistent with the pre-selected charging pile logo that the current robot expects to go to, the current robot changes the target point of movement and adjusts the charging pile to the charging pile corresponding to the target charging pile logo. If the target charging pile logo is consistent with the pre-selected charging pile logo that the current robot expects to go to, the current robot continues to move to the charging pile corresponding to the pre-selected charging pile logo and charges when it reaches the charging pile.
[0080] In the above embodiment, when the current robot is in the charging preparation state, the scheduling information of all robots is obtained, so that the scheduling information of each robot can be used to make charging decisions, so that each robot can reach a consensus. Based on the scheduling information, a list of to-be-charged identifications and a charging decision list are generated. The list of to-be-charged identifications contains the identifications of the robots that need to be charged, and the charging decision list contains the to-be-charged identifications and the charging pile identifications that match each to-be-charged identification. If the to-be-charged identification list does not contain the identification of the current robot, it means that the charging urgency of the current robot is less than that of other robots, and charging can be temporarily suspended, so the current robot gives up charging; if the to-be-charged identification list contains the identification of the current robot, it means that the charging urgency of the current robot is higher, and the current robot needs to be arranged for charging first, so the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification according to the operating environment map for automatic recharging. The current robot makes charging decisions based on its own and other robots' scheduling information, and intelligently selects the robot to be charged, which can avoid the recharging conflict problem between multiple robots, increase the average continuous working time of each robot, and thus improve work efficiency. Moreover, each robot can obtain the scheduling information of other robots and make decisions only by using its own IoT communication unit. This is a distributed scheduling method, and a consistent charging decision can be reached without deploying a unified central decision-making node, thus reducing costs.
[0081] In one embodiment, before S202, it also includes: obtaining a recharge capacity threshold, a previous charging decision time, and a recharge waiting time; if the current power is less than or equal to the recharge capacity threshold, and the current time is greater than or equal to the sum of the previous charging decision time and the recharge waiting time, it is determined that the current robot meets the charging conditions and the state of the current robot is adjusted to a charging ready state.
[0082] Among them, the recharge capacity threshold is a value used to determine whether the robot can stop charging, which can be determined according to the power consumption, working time, etc. of the robot. For example, the recharge capacity threshold can be 80%, 75% or other values. The last charging decision time is the time when the robot made the last charging decision. After each charging decision, the robot records the time of the charging decision, and uses it as the last charging decision time when making the next charging decision. When the robot is turned on, the last charging decision time is set to the difference between the power-on time and the recharge waiting time. The recharge waiting time is the interval between two charging decisions made by the robot, which can be determined according to the power consumption and power per unit time of the robot. For example, the recharge waiting time can be 10 minutes, 20 minutes, etc. By setting the recharge waiting time, the robot can avoid reducing its work efficiency due to frequent judgments on whether to charge.
[0083] If the current battery level of the robot is less than or equal to the recharge threshold, and the current time is greater than or equal to the sum of the last charging decision time and the recharge waiting time, it means that the current battery level of the robot is low, and the time interval from the last charging decision is greater than or equal to the recharge waiting time. It is determined that the current robot meets the charging conditions and the current robot state is adjusted to the charging preparation state.
[0084] In the above embodiment, if the current power is less than or equal to the recharge power threshold, and the current time is greater than or equal to the sum of the previous charging decision time and the recharge waiting time, it is determined that the current robot meets the charging conditions and the current robot state is adjusted to the charging preparation state. This can prevent the robot from reducing its work efficiency due to frequent charging.
[0085] In one embodiment, Figure 3 As shown, S204 specifically includes the following steps:
[0086] S302, obtaining a list of candidate robot identifiers and a list of candidate charging piles.
[0087] The candidate robot identification list is a list for storing sorted candidate robot identifications. The candidate robot is a robot in a charging preparation state. The candidate charging pile list is a list for storing sorted charging pile identifications.
[0088] In one embodiment, S302 specifically includes: obtaining an initial robot identification list and an initial charging pile list; sorting each robot identification in the initial robot identification list based on the surplus power corresponding to each robot in the initial robot identification list to obtain a candidate robot identification list; sorting each charging pile identification in the initial charging pile list based on the surplus power corresponding to each charging pile in the initial charging pile list to obtain a candidate charging pile list.
[0089] Among them, the initial robot identification list is a list for storing candidate robot identifications. The initial charging pile list is a list for storing charging pile identifications. The surplus power is the difference between the current power of the robot and the warning power threshold. The surplus power corresponding to the charging pile is the surplus power of the robot currently charging on the charging pile. When there is no robot charging on the charging pile, its surplus power can be set to 100. For example, if the robot currently charging on charging pile A is robot 001, the surplus power corresponding to the charging pile is the current surplus power of robot 001. The warning power threshold is a power threshold used to determine whether the robot can work normally, and is generally set to be less than the recharge power threshold. When the robot's power is less than the warning power threshold, the robot may stop working due to low power.
[0090] The current robot can sort the robot identifiers in the initial robot identifier list based on the surplus power corresponding to each robot in the initial robot identifier list, for example, sorting the robot identifiers according to the size of the surplus power. When the surplus power corresponding to multiple robots is the same, they can be sorted according to the size of the robot identifiers. The current robot can sort the charging pile identifiers in the initial charging pile list based on the surplus power corresponding to each charging pile in the initial charging pile list, for example, sorting the charging pile identifiers according to the size of the surplus power corresponding to each charging pile. When the surplus power corresponding to each charging pile is the same, they can be sorted according to the serial number of the charging pile.
[0091] The current robot sorts the robots and charging piles in the charging preparation state according to the surplus power, and obtains a candidate robot identification list and a candidate charging pile list, so as to facilitate the judgment of whether the candidate robots should be charged and match the candidate robots and candidate charging piles, thereby improving the efficiency of charging decision-making.
[0092] S304, traverse the candidate robot identification list, and when traversing to the target robot identification in the candidate robot identification list, extract the first remaining power corresponding to the target robot identification and the second remaining power corresponding to the target charging pile identification in the candidate charging pile list from the scheduling information.
[0093] Among them, the first remaining power is the current remaining power of the robot corresponding to the target candidate identifier. The second remaining power is the current remaining power of the robot charging on the charging pile corresponding to the target charging pile identifier. The target charging pile identifier is the identifier of the charging pile at a specific position in the candidate charging pile list, for example, it can be the identifier of the charging pile that ranks first, or it can also be the identifier of the charging pile that ranks last. The current robot can traverse the candidate robot identifier list. For example, the current robot traverses the candidate robot identifier list in order from front to back, and when traversing to the target candidate identifier Ai, it obtains the remaining power of the robot Ai and the remaining power of the charging pile corresponding to the target charging pile identifier that ranks first in the candidate charging pile list. If there is no robot charging on the charging pile corresponding to the target charging pile identifier, its remaining power can be set to full power.
[0094] S306: If the first remaining power and the second remaining power meet the power condition, the target robot identifier is added to the first preset list, and the target charging pile identifier is added to the second preset list.
[0095] The power condition is a condition for determining whether the robot corresponding to the target robot identifier can be charged with the charging pile corresponding to the target charging pile identifier. For example, the power condition may be that the first remaining power is less than the warning power threshold and the second remaining power is greater than the warning power threshold. Alternatively, the power condition may be that the second remaining power is full.
[0096] If the first remaining power and the second remaining power meet the power condition, the target robot identifier is deleted from the candidate robot identifier list and added to the first preset list, and the target charging pile identifier is deleted from the candidate charging pile list and added to the second preset list.
[0097] S308, when the candidate robot identification list is traversed, the obtained first preset list is determined as the list of identifications to be charged, and the obtained second preset list is determined as the list of identifications of available charging piles.
[0098] The current robot traverses the candidate robot identification list and adds the robot identifications that meet the conditions to the first preset list. The first preset list obtained when the traversal of the candidate robot identification list is completed is the list of identifications to be charged. The robot identifications in the list of identifications to be charged are the identifications of robots that need to be charged.
[0099] S310: Generate a charging decision list based on the list of identifications to be charged and the list of identifications of available charging piles.
[0100] When the current robot generates a list of identifications to be charged, it selects a charging pile from the list of available charging pile identifications and assigns it to the robot in the list of identifications to be charged, and generates a charging decision list based on the identification of the charging pile assigned to the robot in the list of identifications to be charged.
[0101] In one embodiment, Figure 4 As shown, S310 specifically includes the following steps:
[0102] S402, traversing the list of to-be-charged identifiers, and when traversing to a target to-be-charged identifier in the list of to-be-charged identifiers, obtaining a pre-selected charging pile identifier corresponding to the target to-be-charged identifier.
[0103] The pre-selected charging pile identifier is the identifier of the charging pile pre-selected by the robot. For example, when the robot changes to the charging preparation state, a charging pile is selected from all charging piles as the pre-selected charging pile, and the identifier of the charging pile is the pre-selected charging pile identifier. The current robot traverses the list of to-be-charged identifiers, and when traversing to the target to-be-charged identifier, obtains the pre-selected charging pile identifier of the charging pile pre-selected by the robot corresponding to the target to-be-charged identifier.
[0104] S404, if the available charging pile identifier list includes the pre-selected charging pile identifier, add the target to-be-charged identifier and the pre-selected charging pile identifier to a third preset list, delete the target to-be-charged identifier from the to-be-charged identifier list, and delete the pre-selected charging pile identifier from the available charging pile identifier list.
[0105] If the available charging pile identification list includes the pre-selected charging pile identification, the target to-be-charged identification and the pre-selected charging pile identification are added to the third preset list, and the target to-be-charged identification is deleted from the to-be-charged identification list, and the pre-selected charging pile identification is deleted from the available charging pile identification list. For example, if the target to-be-charged identification is Ai, and the pre-selected charging pile identification corresponding to the robot identified as Ai is Ci, if the available charging pile identification list includes Ci, then the combination (Ai, Ci) is added to the third preset list, and Ai is deleted from the to-be-charged identification list, and Ci is deleted from the available charging pile identification list.
[0106] S406, when the traversal of the list of to-be-charged identifiers is completed, the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles are formed into matching pairs.
[0107] When the list of identifications to be charged is traversed, charging piles are allocated to the robots corresponding to the remaining identifications to be charged, and the remaining identifications to be charged and the remaining charging pile identifications are matched into pairs.
[0108] In one embodiment, S406 specifically includes: when the traversal of the list of identifications to be charged is completed, determining the distance between the robots corresponding to the remaining identifications to be charged and the charging piles corresponding to the remaining charging pile identifications based on the scheduling information; and forming a matching pair of the remaining identifications and the remaining charging pile identifications based on the distance.
[0109] Specifically, for each remaining charging pile identifier, a robot whose distance to the charging pile meets the distance condition is selected from the robots corresponding to the remaining identifiers to be charged, and the identifier corresponding to the robot is matched with the charging pile identifier. The distance condition can be, for example, the closest distance, the distance within a preset range, etc. Matching the remaining identifiers with the remaining charging pile identifiers according to the distance between the robot and the charging pile can enable the robot to charge using a charging pile that is closer, shortening the time it takes for the robot to move to the charging pile and improving the robot's work efficiency.
[0110] S408: Add the matching pair to a third preset list to obtain a charging decision list.
[0111] The current robot adds the matching pairs consisting of the remaining to-be-charged identifiers and the remaining charging pile identifiers to the third preset list to obtain a charging decision list.
[0112] In the above embodiment, when the target to-be-charged identifier in the list of to-be-charged identifiers is traversed, the pre-selected charging pile identifier corresponding to the target to-be-charged identifier is obtained; if the pre-selected charging pile identifier is included in the list of available charging pile identifiers, the target to-be-charged identifier and the pre-selected charging pile identifier are added to the third preset list, and the target to-be-charged identifier is deleted from the list of to-be-charged identifiers, and the pre-selected charging pile identifier is deleted from the list of available charging pile identifiers; when the list of to-be-charged identifiers is traversed to the end, the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles are formed into matching pairs; the matching pairs are added to the third preset list to obtain a charging decision list. Thus, charging piles can be allocated to robots in the list of to-be-charged identifiers based on the list of available charging pile identifiers to meet the charging needs of the robots, and the back-charging conflict problem between multiple robots is avoided, and the average continuous working time of each robot is increased, thereby improving the working efficiency of the robots.
[0113] In one embodiment, after S208, it also includes: when the current robot is in a charging state, re-obtaining the scheduling information of all robots; generating a list of available charging pile identifiers based on the re-obtained scheduling information; if the list of available charging pile identifiers contains the charging pile identifier used by the current robot, charging is stopped.
[0114] Among them, the charging state is the state where the robot is charging. When the robot is charging, a decision to leave the charging pile is made at regular intervals, that is, based on the scheduling information, it is judged whether to stop charging and withdraw from the charging pile to give the charging pile to other robots for use. The robot in the charging state re-obtains the scheduling information and generates a list of available charging pile identifiers according to the obtained scheduling information. The method for generating the list of available charging pile identifiers can refer to Figure 3 the embodiment. If the list of available charging pile identifiers contains the identifier of the charging pile used by the current robot, it means that the charge of the current robot has reached the recharge threshold, and there are other robots that need to use the charging pile. Therefore, the current robot stops charging and withdraws from the charging pile.
[0115] In the above embodiment, when the state of the current robot is the charging state, the scheduling information of all robots is re-obtained; based on the re-obtained scheduling information, a list of available charging pile identifiers is generated; if the list of available charging pile identifiers contains the identifier of the charging pile used by the current robot, charging is stopped. Thus, a consistent charging decision can be reached among the robots, enabling the robots that do not need to continue charging to withdraw from the charging pile and give it to robots with a higher charging urgency, improving the average continuous working time of each robot, and继而 improving the working efficiency of the robot.
[0116] In one embodiment, as Figure 5 shown, the charging method of the robot includes the following steps:
[0117] First, perform charging scheduling configuration for the robot. Assume that there are n robots (identified as A1,..., An) in the working environment, and these n robots share m charging piles (identified as C1,..., Cm). n and m are positive integers greater than or equal to 1, and n is greater than m. Each robot stores the position coordinates of the charging piles C1,..., Cm in its working environment map, and can autonomously navigate to the positions of each charging pile according to the stored position coordinates and dock at the charging pile for charging. If the maximum distance between any two charging piles in the map is D meters, and the robots can communicate normally when they are no more than L meters apart from each other, then the positions of the charging piles need to satisfy D less than L, preferably D < L / 2. Assume that the battery level range of the robot is 0 to 100. For the robot Ak, set the warning battery level threshold Gk and the recharge threshold Zk, and 0 < Gk < Zk < 100. In order to enable the robot to automatically switch between operation and charging, set an operation point Jk for each robot Ak. When the robot finishes charging and reaches Jk, it can enter the normal operation process. The operation point Jk can be the food outlet of a restaurant, the discharge outlet of an assembly line, etc.
[0118] When the robot attempts to make a charging decision during normal operation, specifically, the robot obtains the recharge capacity threshold Zk, the previous charging decision time tk, and the recharge waiting time Tk; if the current power is less than or equal to the recharge capacity threshold, and the current time is greater than or equal to the sum of the previous charging decision time and the recharge waiting time, it is determined that the current robot meets the charging conditions and adjusts the current robot state to the charging preparation state, otherwise it continues to work. If the robot is adjusted to the charging preparation state, it determines the pre-selected charging pile among all the charging piles and moves to the pre-selected charging pile.
[0119] The robot runs the charging decision algorithm while moving toward the charging pile. Specifically, the robot Ak broadcasts the charging scheduling information to other robots, including the robot ID, current position coordinates, currently selected pre-selected charging pile ID, current power, warning power threshold, current state, etc. Among them, the current state is the charging preparation state. The robot Ak receives the scheduling information broadcast by other robots and makes charging decisions.
[0120] The method for the robot to make charging decisions specifically includes: first, determining the robot in the charging ready state according to the scheduling information, and adding the identification of the robot in the charging ready state to the initial robot identification list, and sorting each robot identification in the initial robot identification list based on the surplus power corresponding to each robot in the initial robot identification list to obtain a candidate robot identification list (assuming it is a list P). Add the charging pile identifications of all charging piles to the initial charging pile list, and sort each charging pile identification in the initial charging pile list based on the surplus power corresponding to each charging pile in the initial charging pile list to obtain a candidate charging pile list (assuming it is a list Q). Initialize the first preset list (assuming it is a list Z) and the second preset list (assuming it is a list W). Traverse the list P, and when traversing to the target robot identification Ai in the list P, extract the first remaining power corresponding to the robot Ai from the scheduling information. Select the target charging pile identifier (assuming it is Ci) at the front from the list Q. If there is no robot being charged on Ci, or the first remaining power is less than the warning power threshold and the power of the robot being charged on Ci is greater than the warning power threshold of the robot, then delete Ai from the list P and add it to the list Z, and delete Ci from the list Q and add it to the list W. When the traversal of the candidate robot identifier list is completed, the obtained first preset list is determined as the list of identifiers to be charged (assuming it is Z1), and the obtained second preset list is determined as the list of available charging pile identifiers (assuming it is W1). If the robot Ai is in the list Z1 and the state of Ai is the charging preparation state, the charging decision result of the robot Ai is to give up charging. If the state of the robot Ai is the charging state, and the identifier of the charging pile used by Ai is in W1, then Ai stops charging and exits the charging pile. Next, the identifiers to be charged in the list Z1 are matched with the identifiers of the available charging piles in the list W1. Specifically, for each to-be-charged identifier in Z1, if the pre-selected charging pile identifier (assumed to be Ci) of the robot corresponding to the to-be-charged identifier is in the list W1, put the (Ai, Ci) combination into the third preset list V, delete Ai from Z1, and delete Ci from W1. When the traversal of Z1 is completed, sort the remaining charging pile identifiers in W1 according to the serial number. Then, based on the scheduling information, determine the distance between the robot corresponding to the remaining to-be-charged identifier and the charging pile corresponding to the remaining charging pile identifier; based on the distance, form a matching pair with the remaining identifier and the remaining charging pile identifier, and add the matching pair to the list V to obtain the charging decision list V1. Search the charging pile assigned to the robot Ak in the list V1 (assumed to be Ck), and return the decision result that the robot Ak should go to the charging pile Ck for charging.
[0121] If the result of the robot's charging decision is to give up charging, the broadcast scheduling information will be stopped and the time of this charging decision will be recorded, and it will be used as the previous charging decision time when the next charging decision is made. When the robot stops charging, it will execute the operation of exiting the charging pile and go to the work point to work. If the result of the robot's charging decision is to go to the charging pile Ck for charging, and Ck is not the same as the pre-selected charging pile, the moving target point will be changed, and it will go to Ck for charging. If the result of the robot's charging decision is to go to the pre-selected charging pile for charging, it will go to the pre-selected charging pile and after the distance from the pre-selected charging pile is less than 1 meter, it will no longer make a charging decision and dock at the charging pile for charging. If the robot has not yet obtained the charging decision result, it will continue to move to the pre-selected charging pile, wait when it is within 1 meter of the pre-selected charging pile, and continue to make charging decisions until the charging decision result is obtained.
[0122] In one embodiment, Figure 6 As shown, the charging method of the robot includes the following steps:
[0123] S602, when the current state of the robot is a charging ready state, obtaining the scheduling information of all robots.
[0124] S604, traverse the candidate robot identification list, and when traversing to the target robot identification in the candidate robot identification list, extract the first remaining power corresponding to the target robot identification from the scheduling information, and the second remaining power corresponding to the target charging pile identification in the candidate charging pile list.
[0125] S606: If the first remaining power and the second remaining power meet the power condition, the target robot identifier is added to the first preset list, and the target charging pile identifier is added to the second preset list.
[0126] S608, when the candidate robot identification list is traversed, the obtained first preset list is determined as the list of identifications to be charged, and the obtained second preset list is determined as the list of identifications of available charging piles.
[0127] S610, traverse the list of to-be-charged identifiers, and when traversing to a target to-be-charged identifier in the list of to-be-charged identifiers, obtain a pre-selected charging pile identifier corresponding to the target to-be-charged identifier.
[0128] S612: If the list of available charging pile identifiers includes the pre-selected charging pile identifier, add the target to-be-charged identifier and the pre-selected charging pile identifier to a third preset list, delete the target to-be-charged identifier from the list of to-be-charged identifiers, and delete the pre-selected charging pile identifier from the list of available charging pile identifiers.
[0129] S614, when the traversal of the list of to-be-charged identifiers is completed, the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles are formed into matching pairs.
[0130] S616: Add the matching pair to a third preset list to obtain a charging decision list.
[0131] S618: If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging.
[0132] S620: If the list of identifications to be charged contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification according to the operating environment map for automatic recharging.
[0133] S622, when the current state of the robot is the charging state, re-acquire the scheduling information of all robots.
[0134] S624, generating a list of available charging pile identifiers based on the re-acquired scheduling information;
[0135] S626: If the list of available charging pile identifiers includes the charging pile identifier used by the current robot, the current robot stops charging.
[0136] For the specific contents of S602 to S626 above, reference may be made to the specific implementation process described above.
[0137] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0138] Based on the same inventive concept, the embodiment of the present application also provides a robot charging device for implementing the robot charging method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the charging device for one or more robots provided below can refer to the limitations of the robot charging method above, and will not be repeated here.
[0139] In one embodiment, Figure 7 As shown, a charging device for a robot is provided, including: an acquisition module 702, a generation module 704 and a charging module 706, wherein:
[0140] The acquisition module 702 is used to acquire the scheduling information of all robots when the current state of the robot is the charging preparation state;
[0141] A generating module 704 is used to generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching each to-be-charged identifier;
[0142] The charging module 706 is used for the current robot to give up charging if the list of to-be-charged identifiers does not contain the identifier of the current robot;
[0143] The charging module 706 is also used to search for the target charging pile identifier in the charging decision list according to the identifier of the current robot if the list of identifiers to be charged contains the identifier of the current robot, and control the current robot to go to the charging pile corresponding to the target charging pile identifier according to the working environment map for automatic recharging.
[0144] In one embodiment, the apparatus further comprises:
[0145] The acquisition module 702 is also used to re-acquire the scheduling information of all robots when the current state of the robot is the charging state;
[0146] The generating module 704 is further used to generate a list of available charging pile identifiers based on the re-acquired scheduling information;
[0147] The charging module 706 is further configured to stop charging the current robot if the list of available charging pile identifiers includes the charging pile identifier used by the current robot.
[0148] In one embodiment, Figure 8 As shown, the device also includes:
[0149] The acquisition module 702 is further used to obtain the recharge amount threshold, the last charging decision time and the recharge waiting time;
[0150] The determination module 708 is used to determine that the current robot meets the charging conditions and adjust the state of the current robot to the charging preparation state if the current power is less than or equal to the recharge power threshold and the current time is greater than or equal to the sum of the previous charging decision time and the recharge waiting time.
[0151] In one embodiment, the generating module 704 is further configured to:
[0152] Obtain a list of candidate robot identifiers and a list of candidate charging piles;
[0153] The candidate robot identification list is traversed, and when the target robot identification in the candidate robot identification list is traversed, a first remaining power corresponding to the target robot identification and a second remaining power corresponding to the target charging pile identification in the candidate charging pile list are extracted from the scheduling information;
[0154] If the first remaining power and the second remaining power meet the power condition, the target robot identifier is added to the first preset list, and the target charging pile identifier is added to the second preset list;
[0155] When the candidate robot identification list is traversed, the obtained first preset list is determined as the list of identifications to be charged, and the obtained second preset list is determined as the list of identifications of available charging piles;
[0156] A charging decision list is generated based on the list of identifications to be charged and the list of identifications of available charging piles.
[0157] In one embodiment, the apparatus further comprises:
[0158] The acquisition module 702 is also used to acquire an initial robot identification list and an initial charging pile list;
[0159] A sorting module 710 is used to sort the robot identifiers in the initial robot identifier list based on the surplus power corresponding to each robot in the initial robot identifier list to obtain a candidate robot identifier list;
[0160] The sorting module 710 is further configured to sort the charging pile identifiers in the initial charging pile list based on the surplus electricity corresponding to each charging pile in the initial charging pile list to obtain a candidate charging pile list.
[0161] In one embodiment, the generating module 704 is further configured to:
[0162] Traverse the list of to-be-charged identifiers, and when traversing to the target to-be-charged identifier in the list of to-be-charged identifiers, obtain the pre-selected charging pile identifier corresponding to the target to-be-charged identifier;
[0163] If the list of available charging pile identifiers includes the pre-selected charging pile identifier, add the target to-be-charged identifier and the pre-selected charging pile identifier to the third preset list, delete the target to-be-charged identifier from the list of to-be-charged identifiers, and delete the pre-selected charging pile identifier from the list of available charging pile identifiers;
[0164] When the traversal of the list of to-be-charged identifiers is completed, the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles are formed into matching pairs;
[0165] The matching pairs are added to the third preset list to obtain a charging decision list.
[0166] In one embodiment, the generating module 704 is further configured to:
[0167] When the list of to-be-charged identifiers is traversed, the distance between the robot corresponding to the remaining to-be-charged identifier and the charging pile corresponding to the remaining charging pile identifier is determined based on the scheduling information;
[0168] Based on the distance, the remaining identifiers are matched with the remaining charging pile identifiers.
[0169] Each module in the charging device of the robot can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0170] In one embodiment, a robot is provided, whose internal structure diagram can be shown as follows: Fig. 9 As shown. The robot includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the robot is used to provide computing and control capabilities. The memory of the robot includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the robot is used to exchange information between the processor and an external device. The communication interface of the robot is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a charging method of a robot is implemented. The display unit of the robot is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the robot can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the robot shell, or an external keyboard, touchpad or mouse, etc.
[0171] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the robot to which the scheme of the present application is applied. The specific robot may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0172] In one embodiment, a robot is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0173] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0174] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0177] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0178] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for charging a robot, characterized in that: The charging method is applied to a robot, the robot comprising a mobile chassis, a communication module, an automatic recharging module, a memory and a processor; the mobile chassis is used to drive the robot to move autonomously, the communication module is used to realize communication between the robot and other robots, the automatic recharging module is used to realize the automatic recharging function of the robot, the memory stores a working environment map of the robot, and the working environment map stores the location information of each charging pile; The charging method comprises: When the current state of the robot is a charging preparation state, obtaining the scheduling information of all robots; the scheduling information includes the position, power and state of each robot; the state of the robot includes a charging preparation state, a charging state or a charging completion state; Generate a list of to-be-charged identifiers and a charging decision list based on the scheduling information; the charging decision list includes to-be-charged identifiers and charging pile identifiers matching each of the to-be-charged identifiers; If the list of identifications to be charged does not contain the identification of the current robot, the current robot gives up charging; If the list of identifications to be charged contains the identification of the current robot, the target charging pile identification is searched in the charging decision list according to the identification of the current robot, and the current robot is controlled to go to the charging pile corresponding to the target charging pile identification for automatic recharging according to the working environment map.
2. The charging method according to claim 1, characterized in that: The charging method further comprises: When the current robot is in the charging state, re-obtain the scheduling information of all robots; Based on the re-acquired scheduling information, a list of available charging pile identifiers is generated; If the list of available charging pile identifiers contains the charging pile identifier used by the current robot, the current robot stops charging.
3. The charging method according to claim 1, characterized in that: The method further comprises: Get the recharge capacity threshold, last charging decision time and recharge waiting time; If the current power level is less than or equal to the recharge power threshold, and the current time is greater than or equal to the sum of the previous charging decision time and the recharge waiting time, it is determined that the current robot meets the charging conditions and the state of the current robot is adjusted to a charging ready state.
4. The charging method according to claim 1, characterized in that: The generating of the to-be-charged identification list and the charging decision list based on the scheduling information includes: Obtain a list of candidate robot identifiers and a list of candidate charging piles; The candidate robot identification list is traversed, and when the target robot identification in the candidate robot identification list is traversed, a first remaining power corresponding to the target robot identification and a second remaining power corresponding to the target charging pile identification in the candidate charging pile list are extracted from the scheduling information; If the first remaining power and the second remaining power meet the power condition, the target robot identifier is added to the first preset list, and the target charging pile identifier is added to the second preset list; When the candidate robot identification list is traversed, the obtained first preset list is determined as the list of identifications to be charged, and the obtained second preset list is determined as the list of identifications of available charging piles; A charging decision list is generated based on the list of to-be-charged identifications and the list of available charging pile identifications.
5. The charging method according to claim 4, characterized in that: The charging method further comprises: Get the initial robot identification list and initial charging pile list; sorting the robot identifiers in the initial robot identifier list based on the surplus power corresponding to each robot in the initial robot identifier list to obtain the candidate robot identifier list; The charging pile identifiers in the initial charging pile list are sorted based on the surplus electricity corresponding to each charging pile in the initial charging pile list to obtain the candidate charging pile list.
6. The charging method according to claim 4, characterized in that: The generating a charging decision list based on the list of to-be-charged identifiers and the list of available charging pile identifiers includes: Traversing the list of to-be-charged identifiers, when traversing to a target to-be-charged identifier in the list of to-be-charged identifiers, obtaining a pre-selected charging pile identifier corresponding to the target to-be-charged identifier; If the list of available charging pile identifiers includes the pre-selected charging pile identifier, add the target to-be-charged identifier and the pre-selected charging pile identifier to a third preset list, delete the target to-be-charged identifier from the to-be-charged identifier list, and delete the pre-selected charging pile identifier from the list of available charging pile identifiers; When the traversal of the list of to-be-charged identifiers is completed, the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles are formed into matching pairs; The matching pairs are added to the third preset list to obtain a charging decision list.
7. The charging method according to claim 6, characterized in that: When the traversal of the list of to-be-charged identifiers is completed, forming a matching pair of the remaining to-be-charged identifiers in the list of to-be-charged identifiers and the remaining charging pile identifiers in the list of candidate charging piles includes: When the list of to-be-charged identifiers is traversed, the distance between the robot corresponding to the remaining to-be-charged identifier and the charging pile corresponding to the remaining charging pile identifier is determined based on the scheduling information; The remaining to-be-charged identifiers and the remaining charging pile identifiers are matched into a pair based on the distance.
8. A robot, characterized in that: The robot includes a mobile chassis, a communication module, an automatic recharging module, a memory and a processor; the mobile chassis is used to drive the robot to move autonomously, the communication module is used to realize communication between the robot and other robots, the automatic recharging module is used to realize the automatic recharging function of the robot, the memory stores the robot's working environment map, and the working environment map stores the location information of each charging pile; the memory stores a computer program, and the processor implements the steps of the charging method described in any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the charging method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the charging method according to any one of claims 1 to 7 are implemented.
