Robot control method, electronic equipment, robot and storage medium

By planning and calculating the cost of moving paths, smart lawn mowers can find the optimal charging piles and paths, solving the problem of lawn mowers driving long distances in the existing technology, and improving work efficiency.

CN120029290APending Publication Date: 2025-05-23SHENZHEN MAMMOTION INNOVATION CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510171464.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

When charging, existing smart lawn mowers must drive a long distance back to a fixed charging pile, which will affect the mowing efficiency, especially in large areas of lawns or complex terrain.

Method used

By planning the movement path from the current position of the robot to multiple candidate charging piles, and calculating the path cost of each path, the optimal charging pile and target moving path are determined, so that the robot moves along the target path to the optimal charging pile for charging.

Benefits of technology

It reduces the round trip time of the robot during the recharge process and improves the working efficiency of the lawn mower.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029290A_ABST
    Figure CN120029290A_ABST
Patent Text Reader

Abstract

The invention provides a robot control method, electronic equipment, a robot and a storage medium, and the method comprises the steps: when the robot meets a charging condition, carrying out the charging of at least two candidate charging piles based on the current position point of the robot and the positions of at least two candidate charging piles in a plurality of charging piles; planning a moving path from the current position point to each candidate charging pile; calculating the path cost of each moving path; and according to the path cost of each moving path, a target moving path is determined from the moving paths corresponding to the at least two candidate charging piles, and the robot is controlled to move to the corresponding charging pile along the target moving path. According to the robot control method provided by the invention, the robot can be controlled to move to the optimal charging pile along the target moving path for charging, and the working efficiency of the robot can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot control technology, and in particular to a robot control method, electronic equipment, a robot and a storage medium. Background Art

[0002] At present, most smart lawn mowers on the market are equipped with a charging pile. When the power of the lawn mower is lower than the preset threshold, it will plan the optimal recharging path and return to the fixed charging pile for charging. However, the disadvantage of the above solution is that no matter where the lawn mower is on the lawn, even if it is far away from the charging pile, the lawn mower must travel a long distance to return to the charging pile. This solution affects the mowing efficiency to a certain extent, especially in large lawns or complex multi-region terrain. Summary of the invention

[0003] The embodiments of the present application provide a robot control method, an electronic device, a robot and a storage medium, which can solve at least part of the above-mentioned technical problems.

[0004] In a first aspect, the present application provides a robot control method, the robot control method is used to control a robot to move to one of a plurality of charging piles, the robot control method comprising:

[0005] When the robot meets the charging condition, based on the current position of the robot and the positions of at least two candidate charging piles among the plurality of charging piles, a moving path from the current position to each of the second candidate charging piles is planned;

[0006] Calculating a path cost for each of the moving paths; and

[0007] According to the path cost of each of the moving paths, a target moving path is determined from the moving paths corresponding to the at least two candidate charging piles, and the robot is controlled to move along the target moving path to the corresponding charging pile.

[0008] The robot control method provided in the present application plans a moving path from the robot's current position point to each candidate charging pile when the robot meets the charging conditions, calculates the path cost of each moving path, and determines the target moving path according to the path cost of each moving path, and controls the robot to move along the target moving path to the corresponding charging pile for charging. In this way, the optimal charging pile and target moving path can be planned according to the current position point of the robot and the positions of at least two candidate charging piles, so that the robot can move along the target moving path to the optimal charging pile for charging, which can reduce the round-trip time of the robot during the recharging process and improve the work efficiency of the robot.

[0009] In some embodiments, the planning method of the moving path from the current location point to any of the candidate charging piles includes:

[0010] Based on the current position of the robot and the position of the candidate charging pile, at least one pre-stored communication path is determined; wherein the communication path connects the candidate charging pile and the working area, or the communication path connects two working areas that are spaced apart from each other;

[0011] Planning at least one local path located in the working area; the local path connects the current position point and the connected path, or the local path connects two connected paths; and

[0012] The connecting path and the local path are spliced ​​to obtain a moving path corresponding to the candidate charging pile.

[0013] In some embodiments, the calculating the path cost of each of the moving paths includes:

[0014] Calculating a first path cost of a connected path and a second path cost of a local path in each of the moving paths; and

[0015] The path cost of each of the moving paths is obtained based on the first path cost of the connecting path and the second path cost of the local path in each of the moving paths.

[0016] In some embodiments, the current location point is located in a first working area, and a first candidate charging pile is arranged in the first working area;

[0017] The planning method of the moving path from the current position point to the first candidate charging pile includes:

[0018] Based on the current position of the robot and the position of the first candidate charging pile, obtaining a pre-stored first communication path; wherein the first communication path is located in the first working area, and the first communication path is connected to the first candidate charging pile;

[0019] Planning a first local path from the current location point to the first connected path; and

[0020] The first connecting path and the first local path are spliced ​​to obtain a moving path corresponding to the first candidate charging pile.

[0021] In some embodiments, there are multiple working areas, and the multiple working areas are spaced apart from each other; the second candidate charging pile is connected to the working area through a corresponding communication path; any two working areas are connected through a corresponding communication path, or through other working areas and corresponding communication paths, so that the robot can move to the second candidate charging pile through the corresponding communication path when in any of the working areas;

[0022] The planning method of the moving path from the current position point to the second candidate charging pile includes:

[0023] Based on the current position of the robot, the positions of the plurality of working areas and the position of the second candidate charging pile, taking the working area where the current position of the robot is located as a starting node and the second candidate charging pile as a target node, determining at least one second working area from the plurality of working areas, and determining at least one second connecting path from the plurality of connecting paths;

[0024] In each of the second working areas, a second partial path connected to the corresponding second connecting path is planned; wherein the current position point of the robot and the second candidate charging pile are connected through the second partial path and the second connecting path; and

[0025] The second connecting path and the second local path are spliced ​​to obtain a moving path corresponding to the second candidate charging pile.

[0026] In some embodiments, planning a second local path in each of the second working areas that is connected to the corresponding second connecting path includes:

[0027] Determine the starting point and the end point of each second working area according to the current position of the robot and the position of the second candidate charging pile; wherein the starting point of the working area where the robot is currently located is the current position of the robot, the starting point of each other second working area is the position point when the robot enters the second working area during the movement along the moving path, and the end point of each second working area is the position point when the robot leaves the second working area during the movement along the moving path; and

[0028] Based on the starting point and the end point of each second working area, a second local path from the starting point to the end point of each second working area is planned.

[0029] In some embodiments, the first path cost of at least one of the connecting paths is calculated based on at least one of the length cost, the straightness cost, and the terrain cost of the connecting path; wherein the length cost is used to characterize the length of the moving path, the straightness cost is used to characterize the tortuosity of the moving path, and the terrain cost is used to characterize the slope of the moving path.

[0030] In a second aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to execute the robot control method described in the first aspect.

[0031] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is called by a processor to execute the robot control method described in the first aspect.

[0032] In a fourth aspect, the present application provides a robot, comprising the electronic device described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A flowchart of a robot control method provided in an embodiment of the present application;

[0035] Figure 2 for Figure 1 A first refinement flow chart of step S1 in FIG.

[0036] Figure 3 for Figure 1 A detailed flow chart of step S2 in FIG.

[0037] Figure 4 for Figure 1 A second refinement flow chart of step S1 in FIG.

[0038] Figure 5 A schematic diagram of the first charging scenario provided in an embodiment of the present application;

[0039] Figure 6 for Figure 1 A third detailed flow chart of step S1 in FIG.

[0040] Figure 7 for Figure 6 A detailed flowchart of step S17 in FIG.

[0041] Figure 8 for Figure 6 A detailed flowchart of step S18 in FIG.

[0042] Figure 9 A schematic diagram of a second charging scenario provided in an embodiment of the present application;

[0043] Figure 10 for Figure 9 The road network diagram corresponding to the charging scenario shown;

[0044] Figure 11 for Figure 9 Path planning diagram for the charging scenario shown;

[0045] Figure 12 A topological diagram of an electronic device provided in an embodiment of the present application.

[0046] Figure Number:

[0047] Robot-10; connecting path-B1; connecting path-B2; connecting path-B3; connecting path-B4; connecting path-B5; local path-R01; local path-R02; local path-R03; working area-C0; working area-C1; working area-C2; working area-C3; starting point-P11; starting point-P31; end point-P12; end point-P21; end point-P22; end point-P23; end point-P32; local path-R1; local path-R2; local path-R3; local path-R4; local path-R5; electronic device-600; memory-61; processor-62; drive component 700. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] In the description of the embodiments of the present application, it should be understood that the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the accompanying drawings. The term "connection" in this application, unless otherwise specified, mainly refers to a physical structural connection, and may also include meanings such as direct connection or indirect connection when specified. The terms "first" and "second" in the specification and claims of this application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "includes" and any variations thereof are intended to cover non-exclusive inclusions.

[0050] See also Figure 1 , Figure 1 Flow chart of the robot control method provided in the embodiment of the present application. The present application provides a robot control method, which is used to control the robot 10 to move to one of the multiple charging piles. The robot control method includes steps S1 to S3, which are specifically described as follows:

[0051] Step S1, when the robot 10 meets the charging condition, based on the current position of the robot 10 and the positions of at least two candidate charging piles among the multiple charging piles, planning a moving path from the current position to each of the candidate charging piles;

[0052] Step S2, calculating the path cost of each of the moving paths; and

[0053] Step S3, according to the path cost of each of the moving paths, determining a target moving path from the moving paths corresponding to the at least two candidate charging piles respectively, and controlling the robot 10 to move along the target moving path to the corresponding charging pile.

[0054] The robot control method provided in the present application plans a moving path from the current position of the robot 10 to each candidate charging pile when the robot 10 meets the charging conditions, calculates the path cost of each moving path, and determines the target moving path according to the path cost of each moving path, and controls the robot 10 to move along the target moving path to the corresponding charging pile for charging. In this way, the optimal charging pile and the target moving path can be planned according to the current position of the robot 10 and the positions of at least two candidate charging piles, so that the robot 10 can move along the target moving path to the optimal charging pile for charging, which can reduce the round-trip time of the robot 10 during the recharging process and improve the work efficiency of the robot 10.

[0055] In some embodiments, the robot 10 meets the charging condition, which means that the robot 10 is working in the working area and the remaining power is lower than a preset power threshold.

[0056] It should be noted that the number and distribution positions of the multiple charging piles can be determined according to the area and shape of the working area, and are not limited here. It is not difficult to understand that the distribution positions of the multiple charging piles should be as dispersed as possible, so that no matter where the robot is located in the working area, it can more conveniently plan an optimal charging pile for recharging, thereby saving the time for round-trip charging and giving full play to the advantages of the multi-charging pile layout solution.

[0057] See also Figure 2 , Figure 2 for Figure 1 In some embodiments, the planning method of the moving path from the current location point to any of the candidate charging piles includes:

[0058] Step S11, based on the current position of the robot 10 and the position of the candidate charging pile, determining at least one pre-stored communication path; wherein the communication path connects the candidate charging pile and the working area, or the communication path connects two working areas spaced from each other;

[0059] Step S12, planning at least one local path located in the working area; wherein the local path connects the current position point and the connected path, or the local path connects two connected paths; and,

[0060] Step S13: splicing the connected path and the local path to obtain a moving path corresponding to the candidate charging pile.

[0061] In this way, path planning based on the pre-set connection path can ensure that the robot 10 moves within the pre-set connection path and the working area, and can prevent the robot 10 from moving to a non-working area during the recharging process, thereby improving the safety of the robot 10.

[0062] See also Figure 3 , Figure 3 for Figure 1 In some embodiments, the calculating of the path cost of each moving path includes:

[0063] Step S21, calculating a first path cost of a connected path and a second path cost of a local path in each of the moving paths; and

[0064] Step S22, obtaining the path cost of each of the moving paths based on the first path cost of the connecting path and the second path cost of the local path in each of the moving paths.

[0065] In some embodiments, obtaining the path cost of each of the moving paths based on the first path cost of the connected path and the second path cost of the local path in each of the moving paths includes:

[0066] The path cost of each moving path is calculated according to a first preset calculation formula. The first preset calculation formula is:

[0067] Cost_all=K1*Cost_1+K2*Cost_2;

[0068] Among them, Cost_all is the path cost of one of the moving paths, Cost_1 is the first path cost of the connected path in the moving path, Cost_2 is the second path cost of the local path in the moving path, and K1 and K2 are both constants greater than zero. Exemplarily, K1=K2=1, of course, K1 and K2 can also be other values. In other embodiments, the path cost of each of the moving paths can also be calculated according to other calculation methods, which are not limited here.

[0069] In some embodiments, the first path cost of at least one of the connected paths is calculated based on at least one of the length cost, the straightness cost, and the terrain cost of the connected path. The length cost is used to characterize the length of the moving path. The longer the connected path, the greater its length cost; the straightness cost is used to characterize the tortuosity of the moving path. The more tortuous the connected path, the greater its straightness cost; the terrain cost is used to characterize the slope of the moving path. The greater the slope of the connected path, the greater its terrain cost.

[0070] Exemplarily, when the communication path is located outside the working area, the first path cost of the communication path can be obtained according to a second preset calculation formula. The second preset calculation formula is:

[0071] Cost_1=Cost_length+Cost_straight;

[0072] Among them, Cost_1 is the first path cost of the connected path, Cost_length is the length cost of the connected path, and Cost_straight is the straightness cost of the connected path.

[0073] In some embodiments, when the candidate charging pile is located inside the working area, the path cost of the connection path connected to the candidate charging pile is set to a preset cost value greater than 0 (for example, 0.1), so that the cost value of the connection path can be set to 0 to avoid the failure of the path search algorithm. Figure 5As shown, the first charging pile A1 to the third charging pile A3 are all located inside the working area C0, so the path costs of the connecting path B1 connected to the first charging pile A1, the connecting path B2 connected to the second charging pile A2, and the connecting path B3 connected to the third charging pile A3 are all the preset cost values. Figure 9 As shown, the second charging pile A2 is located inside the working area C2, so the path cost of the connecting path B3 connected to the second charging pile A2 is the preset cost value.

[0074] In some embodiments, the step of determining a target moving path from the moving paths corresponding to the at least two candidate charging piles respectively according to the path cost of each moving path includes:

[0075] The moving path with the minimum path cost is determined as the target moving path.

[0076] In other embodiments, the moving path with the second smallest or third smallest path cost may also be determined as the target moving path, which is not limited here.

[0077] In some embodiments, the current location is located in a first working area, and a first candidate charging pile is set in the first working area. Figure 4 , Figure 4 for Figure 1 The second detailed flowchart of step S1 in FIG. 1 is a flowchart of a method for planning a moving path from the current location point to the first candidate charging pile, including:

[0078] Step S14, based on the current position of the robot and the position of the first candidate charging pile, obtaining a pre-stored first communication path; wherein the first communication path is located in the first working area, and the first communication path connects the first candidate charging pile; wherein all the first communication paths are pre-set and stored in the robot 10 according to the relative position relationship between the first working area and the plurality of charging piles;

[0079] Step S15, planning a first local path from the current position point to the first connected path; and,

[0080] Step S16: Connect the first connection path and the first local path to obtain a moving path corresponding to the first candidate charging pile.

[0081] In some embodiments, planning a first local path from the current location point to the first connected path includes:

[0082] Based on the current position point of the robot 10 and the position of the first connecting path, a first optimal path search algorithm is used to plan a first local path from the current position point to the first connecting path. Exemplarily, the first optimal path search algorithm is one of the JPS algorithm, the A* algorithm, and the hybrid A* algorithm. Among them, the A* algorithm is a heuristic search algorithm used to find the shortest path from the starting point to the end point in a graph or grid. The JPS (Jump Point Search) algorithm is an optimized version of the A* algorithm, which is specially designed for grid path search. The hybrid A* (Hybrid A*) algorithm is a path planning algorithm that combines the traditional A* algorithm and a specific kinematic model. The JPS algorithm, the A* algorithm, and the hybrid A* algorithm belong to the prior art and will not be repeated here.

[0083] For example, see Figure 5 , Figure 5 This is a schematic diagram of a first charging scenario provided in an embodiment of the present application. In the first charging scenario, the plurality of charging piles include a first charging pile A1, a second charging pile A2, and a third charging pile A3.

[0084] Among them, the first charging pile A1 to the third charging pile A3 are all located inside the working area C0, and the first charging pile A1 is connected to the connecting path B1 in the working area C0, the second charging pile A2 is connected to the connecting path B2 in the working area C0, and the third charging pile A3 is connected to the connecting path B3 in the working area C0.

[0085] Assuming that the first charging pile A1 to the third charging pile A3 are all candidate charging piles, the first connecting path corresponding to the first charging pile A1 is the connecting path B1, the first connecting path corresponding to the second charging pile A2 is the connecting path B2, and the first connecting path corresponding to the third charging pile A3 is the connecting path B3.

[0086] The first optimal path search algorithm is used for path planning, and the first local path from the current position point of the robot 10 to the connecting path B1 is the local path R01, the first local path from the current position point of the robot 10 to the connecting path B2 is the local path R02, and the first local path from the current position point of the robot 10 to the connecting path B3 is the local path R03.

[0087] Thus, the moving path corresponding to the first charging pile A1 is the path formed by the splicing of the local path R01 and the connecting path B1, and the path cost of the moving path corresponding to the first charging pile A1 is the sum of the first path cost of the connecting path B1 and the second path cost of the local path R01. The moving path corresponding to the second charging pile A2 is the path formed by the splicing of the local path R02 and the connecting path B2, and the path cost of the moving path corresponding to the second charging pile A2 is the sum of the first path cost of the connecting path B2 and the second path cost of the local path R02. The moving path corresponding to the third charging pile A3 is the path formed by the splicing of the local path R03 and the connecting path B3, and the path cost of the moving path corresponding to the third charging pile A3 is the sum of the first path cost of the connecting path B3 and the second path cost of the local path R03.

[0088] Assuming that, through comparison, the path cost of the moving path corresponding to the second charging pile A2 is the smallest, then the second charging pile A2 can be determined as the optimal charging pile, and thus, the target moving path is the moving path corresponding to the second charging pile A2.

[0089] It should be noted that in other charging scenarios, the working area C0 can also be configured with other numbers of charging piles, such as 4, 5, etc. All charging piles may be arranged outside the working area C0, or all charging piles may be arranged inside the working area C0, or some charging piles may be arranged outside the working area C0, and the remaining charging piles may be arranged inside the working area C0, which is not limited here.

[0090] In some embodiments, there are multiple working areas, and the multiple working areas are spaced apart from each other; the second candidate charging pile is connected to the working area through a corresponding communication path; any two working areas are connected through a corresponding communication path, or through other working areas and corresponding communication paths, so that the robot can move to the second candidate charging pile through the corresponding communication path when in any of the working areas. Among them, all the communication paths are pre-set and stored in the robot 10 according to the relative position relationship between the multiple working areas and the multiple charging piles.

[0091] See also Figure 6 , Figure 6 for Figure 1 In some embodiments, the planning method of the moving path from the current location point to the second candidate charging pile includes:

[0092] Step S17, based on the current position point of the robot 10, the positions of the multiple working areas and the position of the second candidate charging pile, taking the working area where the current position point of the robot 10 is located as the starting node and the second candidate charging pile as the target node, determining at least one second working area from the multiple working areas, and determining at least one second connecting path from the multiple connecting paths; wherein the connecting path corresponding to the second candidate charging pile includes all the second connecting paths;

[0093] Step S18, planning a second local path connected to the corresponding second connecting path in each of the second working areas; wherein the current position point of the robot 10 and the second candidate charging pile are connected to the second connecting path through the second local path, and the local path corresponding to the second candidate charging pile includes all the second local paths; and,

[0094] Step S19: connect the second connection path and the second local path to obtain a moving path corresponding to the second candidate charging pile.

[0095] In this way, when the robot 10 works in a plurality of work areas spaced apart from each other, no matter which work area the robot 10 is located in, an optimal charging pile can be planned for the robot 10 for recharging, thereby saving the time for round-trip charging.

[0096] See also Figure 7 , Figure 7 for Figure 6 In some embodiments, based on the current position of the robot 10, the positions of the plurality of working areas, and the position of the second candidate charging pile, the working area where the current position of the robot 10 is located is used as the starting node, the second candidate charging pile is used as the target node, at least one second working area is determined from the plurality of working areas, and at least one second connecting path is determined from the plurality of connecting paths, including:

[0097] Step S171, based on the positions of the at least two candidate charging piles, the positions of the plurality of working areas, and the first path cost of each of the connected paths, construct a road network graph consisting of the at least two candidate charging piles and the plurality of working areas; wherein each of the charging piles and each of the working areas is a node in the road network graph; and,

[0098] Step S172, based on the road network diagram, taking the working area where the current position of the robot 10 is located as the starting node, taking the second candidate charging pile as the target node, and using the second optimal path search algorithm, at least one second working area is determined from the multiple working areas, and at least one second connecting path is determined from the multiple connecting paths.

[0099] The road network graph is a weighted graph used to represent a path network. The nodes in the road network graph are used to represent the interaction points of the path, and the edges in the road network graph are used to represent the cost value of the path connecting two nodes. In some embodiments, the second optimal path search algorithm is the Dijkstra algorithm. The Dijkstra algorithm is an algorithm for solving the single-source shortest path problem. It is mainly used to find the shortest path from one node to all other nodes in a weighted graph. The Dijkstra algorithm belongs to the prior art and will not be described here.

[0100] See also Figure 8 , Figure 8 for Figure 6 In some embodiments, planning a second local path in each of the second working areas that is connected to the corresponding second connecting path includes:

[0101] Step S181, determining the starting point and the end point of each second working area according to the current position point of the robot 10 and the position of the second candidate charging pile; wherein the starting point of the working area where the robot 10 is currently located is the current position point of the robot 10, the starting point of each other second working area is the position point when the robot 10 enters the second working area during the movement along the moving path, and the end point of each second working area is the position point when the robot 10 leaves the second working area during the movement along the moving path; and,

[0102] Step S182: based on the starting point and the end point of each second working area, planning a second local path from the starting point to the end point of each second working area.

[0103] In some embodiments, planning a second local path from the start point to the end point of each second working area based on the start point and the end point of each second working area includes:

[0104] Based on the starting point and the end point of each of the second working areas, the first optimal path search algorithm is used to plan a second local path from the starting point to the end point of each of the second working areas.

[0105] For example, please refer to Figures 9 - 11 ,Figure 9 A schematic diagram of a second charging scenario provided in an embodiment of the present application; Figure 10 for Figure 9 The road network diagram corresponding to the charging scenario shown; Figure 11 for Figure 9 Path planning diagram for the charging scenario shown.

[0106] like Figure 9 As shown, in the second charging scenario, the number of the working areas is 3, namely, including working area C1, working area C2 and working area C3. The plurality of charging piles include a first charging pile A1, a second charging pile A2 and a third charging pile A3.

[0107] Among them, the first charging pile A1 is connected to the working area C1 through a connecting path B1, the second charging pile A2 is connected to the working area C2 through a connecting path B3, the third charging pile A3 is connected to the working area C3 through a connecting path B5, and the working area C2 is also connected to the working area C1 through a connecting path B2, and is connected to the working area C3 through a connecting path B4.

[0108] Assuming that the first charging pile A1 to the third charging pile A3 are all candidate charging piles, based on the positions of the first charging pile A1 to the third charging pile A3, the positions of the working areas C1 to the working areas C3, and the first path cost Cost_B1 of the connecting path B1, the first path cost Cost_B2 of the connecting path B2, the first path cost Cost_B3 of the connecting path B3, the first path cost Cost_B4 of the connecting path B4, and the first path cost Cost_B5 of the connecting path B5, the following can be constructed: Figure 10 The road network diagram shown.

[0109] like Figure 11 As shown, assuming that the robot 10 is currently located in the working area C2, based on Figure 10In the road network diagram shown, with the working area C2 as the starting node and the first charging pile A1 as the target node, it can be determined that the second working area corresponding to the first charging pile A1 includes the working area C2 and the working area C1, and the second connecting path corresponding to the first charging pile A1 includes the connecting path B2 and the connecting path B1. In the working area C2, the starting point is the current position of the robot 10 and the end point is P21, then the second local path planned in the working area C2 is the local path R1 from the current position of the robot 10 to the end point P21; in the working area C1, the starting point is P11 and the end point is P12, then the second local path planned in the working area C1 is the local path R2 from the starting point P11 to the end point P12, so that the second connecting path corresponding to the first charging pile A1 includes the connecting path B2 and the connecting path B1. The second local path corresponding to the first charging pile A1 includes the local path R1 and the local path R2. The moving path corresponding to the first charging pile A1 is a path formed by sequentially splicing the local path R1, the connecting path B2, the local path R2, and the connecting path B1.

[0110] The path cost Cost_all_A1 of the moving path corresponding to the first charging pile A1 can be calculated according to the following formula:

[0111] Cost_all_A1=K1*Cost_1_A1+K2*Cost_2_A1;

[0112] Cost_1_A1=Cost_B1+Cost_B2;

[0113] Cost_2_A1=Cost_R1+Cost_R2;

[0114] Among them, Cost_1_A1 is the first path cost of the second connecting path corresponding to the first charging pile A1, Cost_2_A1 is the second path cost of the second partial path corresponding to the first charging pile A1. Cost_R1 is the second path cost of the partial path R1, and Cost_R2 is the second path cost of the partial path R2.

[0115] based on Figure 10In the road network diagram shown, with the working area C2 as the starting node and the second charging pile A2 as the target node, it can be determined that the second working area corresponding to the second charging pile A2 includes the working area C2, and the second connecting path corresponding to the second charging pile A2 includes the connecting path B3. In the working area C2, the starting point is the current position of the robot 10 and the end point is P22. The second local path planned in the working area C2 is the local path R3 from the current position of the robot 10 to the end point P22. Therefore, the second connecting path corresponding to the second charging pile A2 includes the connecting path B3. The second local path corresponding to the second charging pile A2 includes the local path R3. The moving path corresponding to the second charging pile A2 is a path formed by sequentially splicing the local path R3 and the connecting path B3.

[0116] The path cost Cost_all_A2 of the moving path corresponding to the second charging pile A2 can be calculated according to the following formula:

[0117] Cost_all_A2=K1*Cost_1_A2+K2*Cost_2_A2;

[0118] Cost_1_A2=Cost_B3;

[0119] Cost_2_A2 = Cost_R3;

[0120] Among them, Cost_1_A2 is the first path cost of the second connecting path corresponding to the second charging pile A2, Cost_2_A2 is the second path cost of the second local path corresponding to the second charging pile A2, and Cost_R3 is the second path cost of the local path R3.

[0121] based on Figure 10In the road network diagram shown, with the working area C2 as the starting node and the third charging pile A3 as the target node, it can be determined that the second working area corresponding to the third charging pile A3 includes the working area C2 and the working area C3, and the second connecting path corresponding to the third charging pile A3 includes the connecting path B4 and the connecting path B5. In the working area C2, the starting point is the current position of the robot 10 and the end point is P23, then the second local path planned in the working area C2 is the local path R4 from the current position of the robot 10 to the end point P23; in the working area C3, the starting point is P31 and the end point is P32, then the second local path planned in the working area C3 is the local path R5 from the starting point P31 to the end point P32, so that the second connecting path corresponding to the third charging pile A3 includes the connecting path B4 and the connecting path B5. The second local path corresponding to the third charging pile A3 includes the local path R4 and the local path R5. The moving path corresponding to the first charging pile A1 is a path formed by sequentially splicing the local path R4, the connecting path B4, the local path R5 and the connecting path B5.

[0122] The path cost Cost_all_A3 of the moving path corresponding to the third charging pile A3 can be calculated according to the following formula:

[0123] Cost_all_A3=K1*Cost_1_A3+K2*Cost_2_A3;

[0124] Cost_1_A3=Cost_B4+Cost_B5;

[0125] Cost_2_A3=Cost_R4+Cost_R5;

[0126] Among them, Cost_1_A3 is the first path cost of the second connecting path corresponding to the third charging pile A3, Cost_2_A3 is the second path cost of the second partial path corresponding to the third charging pile A3, Cost_R4 is the second path cost of the partial path R4, and Cost_R5 is the second path cost of the partial path R5.

[0127] As mentioned above, since the connecting path B3 is located inside the second working area, in order to avoid setting the path cost of the connecting path B3 to 0 and causing the path search algorithm to fail, Cost_B3 can be the preset cost value. Cost_B1~Cost_B2, Cost_B4~Cost_B5, Cost_R1~Cost_R5 can all be calculated based on at least one of the length cost, straightness cost and terrain cost of the path.

[0128] Assuming that among Cost_all_A1, Cost_all_A2, and Cost_all_A3, Cost_all_A2 is the smallest, then the second charging pile A2 can be determined as the optimal charging pile, and thus the target moving path is the moving path corresponding to the second charging pile A2.

[0129] It should be noted that in other charging scenarios, the number of the multiple working areas can also be other values, for example, 4, 5, etc. In some embodiments, the number of the multiple working areas can be more than the number of the multiple charging piles, that is, some working areas are configured with a charging pile, and the remaining working areas are not configured with charging piles. This is not limited here. Optionally, all charging piles may be arranged outside the multiple working areas, or all charging piles may be arranged inside the multiple working areas, or some charging piles may be arranged outside the multiple working areas, and the remaining charging piles may be arranged inside the multiple working areas, which is not limited here.

[0130] See also Figure 12 , Figure 12 A topological diagram of an electronic device provided in an embodiment of the present application. Based on the same inventive concept, the present application also provides an electronic device 600, the electronic device 600 comprising a processor 62 and a memory 61, the memory 61 storing a computer program, the processor 62 running the computer program to execute the robot control method described in any of the above embodiments.

[0131] It should be noted that, for the above-mentioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application. The memory 61 may include: a flash disk, a read-only memory (English: Read-Only Memory, referred to as: ROM), a random access memory (English: Random Access Memory, referred to as: RAM), a disk or an optical disk, etc. The processor 62 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a readily available programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor may implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The processor may be an image processor, a microprocessor, or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention may be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, for example, the processor 62 can read the application program, computer instructions or data in the memory, and complete the steps of the above method in combination with its hardware.

[0132] Specifically, the processor 62 is used to execute:

[0133] Step S1, when the robot 10 meets the charging condition, based on the current position of the robot 10 and the positions of at least two candidate charging piles among the multiple charging piles, planning a moving path from the current position to each of the candidate charging piles;

[0134] Step S2, calculating the path cost of each of the moving paths; and

[0135] Step S3, according to the path cost of each of the moving paths, determining a target moving path from the moving paths corresponding to the at least two candidate charging piles respectively, and controlling the robot 10 to move along the target moving path to the corresponding charging pile.

[0136] In some embodiments, in some embodiments, the planning method of the moving path from the current location point to any of the candidate charging piles includes:

[0137] Step S11, based on the current position of the robot 10 and the position of the candidate charging pile, determining at least one pre-stored communication path; wherein the communication path connects the candidate charging pile and the working area, or the communication path connects two working areas spaced from each other;

[0138] Step S12, planning at least one local path located in the working area; wherein the local path connects the current position point and the connected path, or the local path connects two connected paths; and,

[0139] Step S13: splicing the connected path and the local path to obtain a moving path corresponding to the candidate charging pile.

[0140] In some embodiments, the calculating the path cost of each of the moving paths includes:

[0141] Step S21, calculating a first path cost of a connected path and a second path cost of a local path in each of the moving paths; and

[0142] Step S22, obtaining the path cost of each of the moving paths based on the first path cost of the connecting path and the second path cost of the local path in each of the moving paths.

[0143] In some embodiments, obtaining the path cost of each of the moving paths based on the first path cost of the connected path and the second path cost of the local path in each of the moving paths includes:

[0144] The path cost of each moving path is calculated according to a first preset calculation formula.

[0145] In some embodiments, the step of determining a target moving path from the moving paths corresponding to the at least two candidate charging piles respectively according to the path cost of each moving path includes:

[0146] The moving path with the minimum path cost is determined as the target moving path.

[0147] In some embodiments, the planning method of the moving path from the current location point to the first candidate charging pile includes:

[0148] Step S14, based on the current position of the robot and the position of the first candidate charging pile, obtaining a pre-stored first communication path; wherein the first communication path is located in the first working area, and the first communication path is connected to the first candidate charging pile;

[0149] Step S15, planning a first local path from the current position point to the first connected path; and,

[0150] Step S16: Connect the first connection path and the first local path to obtain a moving path corresponding to the first candidate charging pile.

[0151] In some embodiments, planning a first local path from the current location point to the first connected path includes:

[0152] Based on the current position of the robot 10 and the position of the first communication path, a first optimal path search algorithm is used to plan a first local path from the current position to the first communication path.

[0153] In some embodiments, the planning method of the moving path from the current location point to the second candidate charging pile includes:

[0154] Step S17, based on the current position point of the robot 10, the positions of the multiple working areas and the position of the second candidate charging pile, taking the working area where the current position point of the robot 10 is located as the starting node and the second candidate charging pile as the target node, determining at least one second working area from the multiple working areas, and determining at least one second connecting path from the multiple connecting paths; wherein the connecting path corresponding to the second candidate charging pile includes all the second connecting paths;

[0155] Step S18, planning a second local path connected to the corresponding second connecting path in each of the second working areas; wherein the current position point of the robot 10 and the second candidate charging pile are connected to the second connecting path through the second local path, and the local path corresponding to the second candidate charging pile includes all the second local paths; and,

[0156] Step S19: connect the second connection path and the second local path to obtain a moving path corresponding to the second candidate charging pile.

[0157] In some embodiments, based on the current position of the robot 10, the positions of the plurality of working areas, and the position of the second candidate charging pile, the working area where the current position of the robot 10 is located is used as a starting node, the second candidate charging pile is used as a target node, at least one second working area is determined from the plurality of working areas, and at least one second connecting path is determined from the plurality of connecting paths, including:

[0158] Step S171, based on the positions of the at least two candidate charging piles, the positions of the plurality of working areas, and the first path cost of each of the connected paths, construct a road network graph consisting of the at least two candidate charging piles and the plurality of working areas; wherein each of the charging piles and each of the working areas is a node in the road network graph; and,

[0159] Step S172, based on the road network diagram, taking the working area where the current position of the robot 10 is located as the starting node, taking the second candidate charging pile as the target node, and using the second optimal path search algorithm, at least one second working area is determined from the multiple working areas, and at least one second connecting path is determined from the multiple connecting paths.

[0160] In some embodiments, planning a second local path in each of the second working areas that is connected to the corresponding second connecting path includes:

[0161] Step S181, determining the starting point and the end point of each second working area according to the current position point of the robot 10; wherein the starting point of the working area where the robot 10 is currently located is the current position point of the robot 10, the starting point of each other second working area is the position point when the robot 10 enters the second working area during the movement along the moving path, and the end point of each second working area is the position point when the robot 10 leaves the second working area during the movement along the moving path; and,

[0162] Step S182: based on the starting point and the end point of each second working area, planning a second local path from the starting point to the end point of each second working area.

[0163] In some embodiments, planning a second local path from the start point to the end point of each second working area based on the start point and the end point of each second working area includes:

[0164] Based on the starting point and the end point of each of the second working areas, the first optimal path search algorithm is used to plan a second local path from the starting point to the end point of each of the second working areas.

[0165] Please refer again Figure 12 The present application also provides a robot 10, the robot 10 comprising the electronic device 600 and the driving component 700 as described in any of the above embodiments. The driving component 700 is used to output a driving force under the control of the electronic device 600 to drive the robot 10 to move. Exemplarily, the driving component 700 comprises wheels, a motor, and the like.

[0166] Exemplarily, the robot 10 may be a sweeping robot, a lawn mowing robot, or the like.

[0167] Based on the same inventive concept, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is called by a processor to execute the robot control method described in any of the above embodiments.

[0168] The computer-readable storage medium may be, but is not limited to, a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0169] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application; in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A robot control method, characterized in that: The robot control method is used to control the robot to move to one of the charging piles among a plurality of charging piles, and the robot control method includes: When the robot meets the charging condition, based on the current position of the robot and the positions of at least two candidate charging piles among the plurality of charging piles, a moving path from the current position to each of the candidate charging piles is planned; Calculating a path cost for each of the moving paths; and According to the path cost of each of the moving paths, a target moving path is determined from the moving paths corresponding to the at least two candidate charging piles, and the robot is controlled to move along the target moving path to the corresponding charging pile.

2. The robot control method according to claim 1, characterized in that: The planning method of the moving path from the current position point to any of the candidate charging piles includes: Based on the current position of the robot and the position of the candidate charging pile, at least one pre-stored communication path is determined; wherein the communication path connects the candidate charging pile and the working area, or the communication path connects two working areas that are spaced apart from each other; Planning at least one local path located in the working area; the local path connects the current position point and the connected path, or the local path connects two connected paths; and The connecting path and the local path are spliced ​​to obtain a moving path corresponding to the candidate charging pile.

3. The robot control method according to claim 2, characterized in that: The calculating of the path cost of each moving path includes: Calculating a first path cost of a connected path and a second path cost of a local path in each of the moving paths; and The path cost of each of the moving paths is obtained based on the first path cost of the connecting path and the second path cost of the local path in each of the moving paths.

4. The robot control method according to claim 2, characterized in that: The current location point is located in a first working area, and a first candidate charging pile is arranged in the first working area; The planning method of the moving path from the current position point to the first candidate charging pile includes: Based on the current position of the robot and the position of the first candidate charging pile, obtaining a pre-stored first communication path; wherein the first communication path is located in the first working area, and the first communication path is connected to the first candidate charging pile; Planning a first local path from the current location point to the first connected path; and The first connecting path and the first local path are spliced ​​to obtain a moving path corresponding to the first candidate charging pile.

5. The robot control method according to claim 2, characterized in that: There are multiple working areas, and the multiple working areas are spaced apart from each other; the second candidate charging pile is connected to the working area through a corresponding communication path; any two working areas are connected through a corresponding communication path, or through other working areas and corresponding communication paths, so that the robot can move to the second candidate charging pile through the corresponding communication path when in any of the working areas; The planning method of the moving path from the current position point to the second candidate charging pile includes: Based on the current position of the robot, the positions of the plurality of working areas and the position of the second candidate charging pile, taking the working area where the current position of the robot is located as a starting node and the second candidate charging pile as a target node, determining at least one second working area from the plurality of working areas, and determining at least one second connecting path from the plurality of connecting paths; In each of the second working areas, a second partial path connected to the corresponding second connecting path is planned; wherein the current position point of the robot and the second candidate charging pile are connected through the second partial path and the second connecting path; and The second connecting path and the second local path are spliced ​​to obtain a moving path corresponding to the second candidate charging pile.

6. The robot control method according to claim 5, characterized in that: The step of planning a second local path in each of the second working areas that is connected to the corresponding second connecting path includes: Determine the starting point and the end point of each second working area according to the current position of the robot and the position of the second candidate charging pile; wherein the starting point of the working area where the robot is currently located is the current position of the robot, the starting point of each other second working area is the position point when the robot enters the second working area during the movement along the moving path, and the end point of each second working area is the position point when the robot leaves the second working area during the movement along the moving path; and Based on the starting point and the end point of each second working area, a second local path from the starting point to the end point of each second working area is planned.

7. The robot control method according to claim 3, characterized in that: The first path cost of at least one of the connecting paths is calculated based on at least one of the length cost, the straightness cost and the terrain cost of the connecting path; wherein the length cost is used to characterize the length of the moving path, the straightness cost is used to characterize the tortuosity of the moving path, and the terrain cost is used to characterize the slope of the moving path.

8. An electronic device, characterized in that: The robot control method comprises a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to execute the robot control method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is called by a processor to execute the robot control method according to any one of claims 1 to 7.

10. A robot, characterized in that: The robot comprises the electronic device as claimed in claim 8.

Citation Information

Cited By

  • Route planning method and device, mowing robot and storage medium

    CN116360443A