Robot path planning method, device, electronic device and storage medium
By generating virtual boundaries, the problem of repetitive walking caused by poor map accuracy of the sweeping robot is solved, the cleaning efficiency is improved, and redundant paths are reduced.
Patent Information
- Application Number
- CN202410924583.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Due to poor map accuracy, the sweeping robot passes through the same area multiple times, affecting cleaning efficiency.
By generating virtual boundaries, the robot avoids repeatedly walking in the same area, uses image information to extract boundary contours, determines whether the path is closed loop, and generates a second walking path in the untraveled area, allowing the robot to bypass the virtual boundary.
Effectively reduce redundant paths, improve robot work efficiency, and avoid repeated cleaning of the same area.
Smart Images

Figure CN118484008B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart homes, and in particular to a robot path planning method, device, electronic device and storage medium. Background Art
[0002] A sweeping robot is a smart home device that walks along a preset path in a designated area to clean the floor of the area. The sweeping robot generally walks along the boundary of the walkable area of the cleaning area to a closed loop, and then cleans the interior of the area along a bow-shaped or roundabout path.
[0003] At present, when a sweeping robot is moving, it will pass through the same area repeatedly due to factors such as poor map accuracy, resulting in repeated cleaning of the same area, affecting the cleaning efficiency of the sweeping robot. Summary of the invention
[0004] The present application provides a robot path planning method, device, electronic device and storage medium, which generate a virtual boundary according to the robot's walking path to avoid the robot from repeatedly walking in the same area, thereby improving the robot's work efficiency.
[0005] In a first aspect, the present application provides a robot path planning method, comprising:
[0006] Determine whether the robot's first walking action is completed;
[0007] When the first walking action of the robot ends, obtaining a first walking path of the robot;
[0008] Generate a virtual boundary according to the first walking path;
[0009] Generate a second walking path according to the virtual boundary;
[0010] The robot is controlled to perform a second walking action along a second walking path to bypass the virtual boundary.
[0011] In some implementations, generating a virtual boundary according to the first walking path includes:
[0012] Acquire image information of the first walking path;
[0013] Extracting a boundary contour of the first walking path according to the image information; wherein the boundary contour includes an inner contour and an outer contour;
[0014] Generate a virtual boundary based on the boundary contour.
[0015] In some implementations, generating a virtual boundary according to a boundary contour includes:
[0016] When the first walking action is a walking action along a boundary, determining whether the first walking path is a closed loop;
[0017] When the first walking path is closed, a virtual boundary is generated according to the inner contour;
[0018] When the first walking path is not closed, a virtual boundary is generated according to the outer contour.
[0019] In some implementations, generating a virtual boundary according to the boundary contour further includes:
[0020] When the first walking action is an obstacle-avoiding walking action, a virtual boundary is generated according to the outer contour.
[0021] In some implementations, generating a second walking path according to the virtual boundary includes:
[0022] Generate untraveled areas based on virtual boundaries;
[0023] Determine whether the untraveled area is a real untraveled area;
[0024] When the untraveled area is a real untraveled area, the starting target pixel point with the shortest distance from the current position of the robot in the untraveled area is obtained;
[0025] Taking the initial target pixel point as the starting point, traverse all other untraveled pixel points in the untraveled area in a preset direction to generate a second walking path.
[0026] In some implementations, determining whether a non-traveled area is a real non-traveled area includes:
[0027] Taking the initial position of the first walking action as the starting point, sequentially obtaining the position number of each pixel point that has been walked in the first walking action in accordance with a preset direction; wherein the position number increases along the preset direction, and the preset direction is the same as the moving direction of the robot;
[0028] Traverse the walked pixel points adjacent to the unwalked area in a preset direction;
[0029] When the position serial number of the walked pixel point is not increasing, the unwalked area is recorded as the real unwalked area.
[0030] In some implementations, determining whether the first walking action of the robot is completed includes:
[0031] Get the starting position of the first walking action;
[0032] Get the current position of the robot according to the preset frequency;
[0033] When the current position coincides with the starting position, it is determined that the first walking action is finished.
[0034] In a second aspect, the present application provides a robot path planning device, comprising:
[0035] A processing module, used for determining whether the first walking action of the robot is completed;
[0036] An acquisition module, used for acquiring a first walking path of the robot when the first walking action of the robot ends;
[0037] A first generating module, used for generating a virtual boundary according to the first walking path;
[0038] A second generating module, used for generating a second walking path according to the virtual boundary;
[0039] The control module is used to control the robot to perform a second walking action along a second walking path to bypass the virtual boundary.
[0040] In a third aspect, the present application provides an electronic device, including:
[0041] processor;
[0042] A memory stores a computer program, and when the computer program is executed by a processor, the processor executes the robot path planning method of any one of the first aspect and any one of its embodiments.
[0043] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the instructions are executed by a processor, the processor executes the robot path planning method in the first aspect and any embodiment thereof.
[0044] The robot path planning method, device, electronic device and storage medium provided in the present application generate a virtual boundary according to the robot's walking path, and plan the robot's next walking action according to the virtual boundary, so that the robot can walk around the virtual boundary to avoid the robot from repeatedly walking the same area, reduce redundant paths, and improve the robot's work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] Figure 1 is a flow chart of a robot path planning method in an exemplary embodiment of the present application;
[0047] Figure 2 This is a schematic diagram of determining the end of the first walking action of the robot in an exemplary embodiment of the present application;
[0048] Figure 3A schematic diagram of a robot performing a walking action along a boundary to form a first walking path in an exemplary embodiment of the present application;
[0049] Figure 4 A schematic diagram of a robot performing an obstacle circumvention action to form a first walking path in an exemplary embodiment of the present application;
[0050] Figure 5 A schematic diagram of a robot performing an obstacle circumvention action to form a first walking path in another exemplary embodiment of the present application;
[0051] Figure 6 This is a schematic diagram of determining whether a non-walked area is a real non-walked area in an exemplary embodiment of the present application;
[0052] Figure 7 is a structural diagram of a robot path planning device in an exemplary embodiment of the present application;
[0053] Figure 8 It is a schematic diagram of the structure of an electronic device in an exemplary embodiment of the present application.
[0054] Description of reference numerals:
[0055] 200, working area; 201, obstacle; 202, non-real non-walked area; 203, real non-walked area; 300, robot; 301, first walking path; 3011, walked pixels; 302, virtual boundary; 400, robot walking path planning device; 401, processing module; 402, acquisition module; 403, first generation module; 404, second generation module; 405, control module; 500, electronic device; 501, memory; 502, processor.
[0056] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0057] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0058] The embodiment of the present application provides a robot walking method, which can be applied to the cleaning action of the sweeping robot, and can also be used in the walking path planning of other intelligent robots. The method can be executed by an electronic device, and the electronic device can be a processor, a server or a terminal device. Among them, the processor can be a processing chip, which can be installed inside the robot; the server can be an independent physical server, or a server cluster or distributed device composed of multiple physical servers, or a cloud server that provides cloud computing services; the terminal device can be a smart phone, a computer, etc., but it is not limited to this. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application does not limit this.
[0059] Figure 1 FIG. 1 is a flow chart of a robot path planning method in an exemplary embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a robot path planning method, including steps S101 to S105.
[0060] In step S101, it is determined whether the first walking action of the robot is completed.
[0061] The first walking action may be a walking action of the robot in the working area along a boundary of the working area, or an obstacle-avoiding walking action around an edge of an obstacle in the working area.
[0062] The working area can be generated by the robot using a lidar to scan the environment it is in, or it can be pre-input into the robot's memory by the user through a terminal device such as a mobile phone or tablet computer, and the working area can be directly called from the storage when in use.
[0063] The first walking action ends when the robot walks along the boundary of the working area for one circle to form a closed loop, or when the robot walks around the edge of the obstacle for one circle to form a closed loop.
[0064] In some embodiments, determining whether the first walking action of the robot is completed may include:
[0065] Get the starting position of the first walking action;
[0066] Get the current position of the robot according to the preset frequency;
[0067] When the current position coincides with the starting position, it is determined that the first walking action is finished.
[0068] Figure 2 FIG. 1 is a schematic diagram of determining the end of the first walking action of the robot in an exemplary embodiment of the present application. Figure 2As shown, taking the first walking action of walking along the boundary of the working area 200 as an example, the robot 300 takes the starting position as the starting point and walks along the boundary of the working area 200 in a set direction (counterclockwise or clockwise), and during the walking process, the current position of the robot 300 is obtained in real time according to a preset frequency. When the current position of the robot 300 coincides with the starting position, it indicates that the walking trajectory of the robot forms a closed loop, and the first walking action of the robot ends.
[0069] The starting position and current position of the robot 300 may be the position coordinates of the pixel points of the walking track, and the size of the pixel points is set based on the effective coverage area of the robot. The preset frequency may be set according to the travel speed of the robot and the effective coverage area of the robot, so that the position coordinates of the new pixel points can be obtained instantly when the walking track of the robot 300 generates new pixel points.
[0070] In addition, if the walking action of the robot 300 is interrupted due to external environmental factors or human movement during its movement, the robot 300 can be controlled to move back to the interruption position to continue the first walking action until the first walking action forms a closed loop, and then the robot path planning method in the embodiment of the present application is executed.
[0071] In step S102 , when the first walking motion of the robot 300 ends, the first walking path 301 of the robot 300 is acquired.
[0072] The first walking path 301 is a closed-loop walking track formed when the robot 300 performs the first walking action, and the width of the first walking path 301 is set based on the effective coverage area of the robot 300. For example, when the robot 300 is circular, the width of the first walking path 301 is the diameter of the robot 300.
[0073] In step S101, after the current position of the robot is obtained according to the preset frequency, the position coordinates of the pixel points at the position can be recorded. When obtaining the first walking path, the position coordinates of all the pixel points that have been walked are output, and all the pixel points that have been walked are connected and fitted to form the first walking path.
[0074] In step S103, a virtual boundary is generated according to the first walking path.
[0075] The virtual boundary is a limit position set in the program, which prevents the robot from crossing the virtual boundary during walking, thereby preventing the robot from re-entering the area it has walked through through the virtual boundary.
[0076] In some embodiments, generating a virtual boundary according to the first walking path includes:
[0077] Acquire image information of the first walking path;
[0078] Extracting a boundary contour of the first walking path according to the image information; wherein the boundary contour includes an inner contour and an outer contour;
[0079] Generate a virtual boundary based on the boundary contour.
[0080] Since the first walking path is a ring with a certain width, both the inner and outer sides of the first walking path have boundary contours, the boundary contour located inside the first walking path is the inner contour, and the boundary contour located inside the first walking path is the outer contour.
[0081] In some embodiments, generating a virtual boundary according to a boundary contour includes:
[0082] When the first walking action is a walking action along a boundary, determining whether the first walking path is a closed loop;
[0083] When the first walking path is closed, a virtual boundary is generated according to the inner contour;
[0084] When the first walking path is not closed, a virtual boundary is generated according to the outer contour.
[0085] Figure 3 FIG. 1 is a schematic diagram of a robot performing a walking action along a boundary to form a first walking path in an exemplary embodiment of the present application. Figure 3 As shown, when the first walking action performed by the robot is walking along the boundary, when the first walking path 301 forms a closed loop, the outer contour of the formed first walking path 301 is the boundary of the working area 200, and the inner side of the first walking path 301 is the non-walked area. The robot needs to walk in the non-walked area when performing other walking actions.
[0086] Therefore, when the first walking action is a walking action along a boundary, a virtual boundary 302 is generated according to the inner contour to prevent the robot from re-entering the first walking path that has been walked through the inner contour of the first walking path 301.
[0087] In addition, not shown in the figure, when the first walking path does not form a closed loop, the surface robot is interrupted in the process of executing the walking action along the boundary. At this time, the outer contour of the first walking path can be used as a virtual boundary, and based on the virtual boundary, the robot searches for the interruption connection point and continues to execute the boundary walking action until the first walking path forms a closed loop.
[0088] In some embodiments, generating a virtual boundary according to the boundary contour further includes:
[0089] When the first walking action is an obstacle-avoiding walking action, a virtual boundary is generated according to the outer contour.
[0090] Figure 4 FIG. 1 is a schematic diagram of a robot performing an obstacle circumvention action to form a first walking path in an exemplary embodiment of the present application. Figure 4 As shown, when the first walking action performed by the robot is walking around obstacles, the inner contour of the first walking path 301 formed is the edge of the obstacle 201 in the working area 200, and the outer side of the first walking path 301 is the non-walked area. The robot also needs to walk in the non-walked area when performing other walking actions.
[0091] Therefore, when the first walking action is an obstacle-avoiding walking action, a virtual boundary 302 is generated according to the outer contour to prevent the robot from re-entering the first path that has been walked through the outer contour of the first walking path 301.
[0092] In step S104, a second walking path is generated according to the virtual boundary.
[0093] Among them, the second walking path should be planned in the untraveled area formed by the virtual boundary. The second walking path can be an arched path or a roundabout path formed based on the virtual boundary. The robot can be prevented from crossing the virtual boundary and entering the walked area by making the robot walk along the arched path or the roundabout path in the untraveled area and turning at the virtual boundary.
[0094] In some embodiments, generating the second walking path according to the virtual boundary may include:
[0095] Generate untraveled areas based on virtual boundaries;
[0096] Determine whether the untraveled area is a real untraveled area;
[0097] When the untraveled area is a real untraveled area, the starting target pixel point with the shortest distance from the current position of the robot in the untraveled area is obtained;
[0098] Taking the initial target pixel point as the starting point, traverse all other untraveled pixel points in the untraveled area in a preset direction to generate a second walking path.
[0099] Figure 5 This is a schematic diagram of a robot performing an obstacle circumvention action to form a first walking path in another exemplary embodiment of the present application.
[0100] like Figure 5 As shown, when the robot 300 performs obstacle avoidance walking on multiple dense obstacles 201 in the working area 200, multiple first walking paths 301 are generated, and the multiple first walking paths 301 overlap, resulting in an internal area in the overlapping area. If the outer contours of these first walking paths 301 are used as virtual boundaries 302, the robot 300 cannot enter the internal area to walk when performing other actions, resulting in a missed area.
[0101] Therefore, when generating the second walking path, it is necessary to first determine whether the non-walked area formed based on the virtual boundary 302 is a real non-walked area or a non-real non-walked area caused by walking around the obstacle 201, and filter out the internal area caused by the overlap of the virtual boundaries to avoid missing areas when generating the second walking path.
[0102] In addition, when generating the second walking path based on the internal area, the robot needs to cross the virtual boundary of the overlapping part. At this time, part of the virtual boundary can be cancelled or changed according to the connectivity between the internal area and the untraveled area outside the virtual boundary, the minimum pass area of the robot, etc., so that the robot can enter the internal area and walk with the least area of the walked area.
[0103] Figure 6 Schematic diagram of determining whether a non-walked area is a real non-walked area in an exemplary embodiment of the present application. Figure 6 As shown, in some embodiments, determining whether the non-walked area is a real non-walked area includes:
[0104] Taking the initial position of the first walking action as the starting point, sequentially obtaining the position number of each walked pixel point 3011 in the first walking action according to the preset direction; wherein the position number increases along the preset direction, and the preset direction is the same as the moving direction of the robot;
[0105] Traverse the walked pixel points 3011 adjacent to the non-walked area in a preset direction;
[0106] When the position serial number of the walked pixel point is not increasing, the non-walked area is recorded as the real non-walked area 203.
[0107] Among them, the position number of each walked pixel point 3011 can be recorded in real time during the robot's walking process. For example, while obtaining the current position of the robot in step S101, the position number of the walked pixel point at the current position is marked and recorded. Among them, the position number of the walked pixel point 3011 should increase in sequence according to the direction of movement of the robot.
[0108] In the first walking path 301 of the closed loop formed by the robot performing the obstacle circumvention action, the walked pixel points 3011 are continuous. Therefore, the walked pixel points 3011 adjacent to the non-walked area located on the inner side of the first walking path 301 are also continuous in the same direction, and the position numbers are increasing, which can indicate that there is an obstacle in the non-walked area, and the non-walked area corresponding to the first walking path 301 is a non-real non-walked area 202.
[0109] For the non-walked area generated by the overlapping virtual boundary 302, there are at least two first walking paths 301 adjacent to it. Therefore, the walked pixel points 3011 adjacent to the non-walked area are discontinuous in the same direction, and the position numbers are also chaotic. Therefore, the non-walked area can be regarded as the real non-walked area 203, and the real non-walked area 203 should be covered when generating the second walking path.
[0110] In step S104, the robot is controlled to perform a second walking action along a second walking path to bypass the virtual boundary.
[0111] The second walking motion may be a bow-shaped or circular walking motion to the inner area of the working area.
[0112] By controlling the robot to perform a second walking action in the working area, a second walking path is generated based on the virtual boundary generated by the first walking action, so that the robot can bypass the virtual boundary during walking, avoiding the robot from repeatedly entering the area it has walked, solving the problem of the robot repeatedly passing through the same area, speeding up the robot's work efficiency, and improving the user experience.
[0113] Figure 7 FIG. 1 is a structural diagram of a robot path planning device in an exemplary embodiment of the present application. Figure 7 As shown, based on the above-mentioned robot path planning method, an embodiment of the present application also provides a robot path planning device 400, including: a processing module 401, an acquisition module 402, a first generation module 403, a second generation module 404 and a control module 405.
[0114] The processing module 401 is used to determine whether the first walking action of the robot is finished. For details, please refer to the relevant description of the above step S101, which will not be repeated here.
[0115] The acquisition module 402 is used to acquire the first walking path of the robot when the first walking action of the robot ends. For details, please refer to the relevant description of the above step S102, which will not be repeated here.
[0116] The first generating module 403 is used to generate a virtual boundary according to the first walking path. For details, please refer to the relevant description of the above step S103, which will not be repeated here.
[0117] The second generation module 404 is used to generate a second walking path according to the virtual boundary. For details, please refer to the relevant description of the above step S104, which will not be repeated here.
[0118] The control module 405 is used to control the robot to perform a second walking action along the second walking path to bypass the virtual boundary. For details, please refer to the relevant description of the above step S105, which will not be repeated here.
[0119] Through the mutual cooperation of the above modules, after the robot completes the first walking action, a virtual boundary can be generated based on the first walking path, and a second walking path can be planned based on the virtual boundary, so that the robot walks around the virtual boundary when performing the second walking action. This can avoid the robot repeatedly passing through the area it has walked many times, reduce redundant paths, and speed up the robot's work efficiency.
[0120] Figure 8 FIG. 1 is a schematic diagram of the structure of an electronic device in an exemplary embodiment of the present application. Figure 8 As shown, the electronic device 500 of this embodiment may include: a memory 501 and a processor 502. The memory 501 stores a computer program. When the computer program is executed by the processor 502, the processor 502 executes the robot path planning method in the above embodiment.
[0121] The processor 502 and the memory 501 are connected, for example, via a bus.
[0122] The processor 502 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 502 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0123] The bus may include a path to transmit information between the above components. The bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0124] The memory 501 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0125] The memory 501 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 502. The processor 502 is used to execute the application code stored in the memory 501 to implement the contents shown in the above method embodiment.
[0126] The electronic devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0127] The electronic device of this embodiment can be used to execute the robot walking method of any of the above embodiments. The implementation principle and technical effect are similar and will not be described in detail here.
[0128] The present application also provides a non-transitory computer storage medium storing computer-readable instructions, which, when executed by a processor, enables the processor to execute the robot path planning method in the above embodiment.
[0129] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0130] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present application, the specific implementation methods and the scope of application of the present application, all belong to the scope of protection of the present application. In summary, the content of this specification should not be construed as a limitation on the present application.
Claims
1. A robot path planning method, characterized in that: include: Determine whether the robot's first walking action is completed; When the first walking action of the robot ends, obtaining a first walking path of the robot; generating a virtual boundary according to the first walking path; generating a second walking path according to the virtual boundary; controlling the robot to perform a second walking action along the second walking path to bypass the virtual boundary; The step of generating the virtual boundary according to the first walking path includes: Acquire image information of the first walking path; Extracting a boundary contour of the first walking path according to the image information; wherein the boundary contour includes an inner contour and an outer contour; generating the virtual boundary according to the boundary contour; The step of generating a second walking path according to the virtual boundary includes: Generating an untraveled area according to the virtual boundary; Determining whether the non-walked area is a real non-walked area; When the non-walked area is a real non-walked area, obtaining a starting target pixel point in the non-walked area that is shortest in distance from the current position of the robot; Taking the starting target pixel point as the starting point, traverse all other non-traveled pixel points in the non-traveled area in a preset direction to generate the second walking path; Wherein, the determining whether the non-walked area is a real non-walked area comprises: Taking the initial position of the first walking action as the starting point, sequentially acquiring the position number of each pixel point that has been walked in the first walking action in a preset direction; wherein the position number increases along the preset direction, and the preset direction is the same as the moving direction of the robot; Traversing the walked pixel points adjacent to the non-walked area according to the preset direction; When the position sequence number of the walked pixel point is not increasing, the non-walked area is recorded as a real non-walked area.
2. The robot path planning method according to claim 1, characterized in that: The step of generating the virtual boundary according to the boundary contour comprises: When the first walking action is a walking action along a boundary, determining whether the first walking path is a closed loop; When the first walking path is closed, generating the virtual boundary according to the inner contour; When the first walking path is not a closed loop, the virtual boundary is generated according to the outer contour.
3. The robot path planning method according to claim 2, characterized in that: The generating the virtual boundary according to the boundary contour further includes: When the first walking action is an obstacle-avoiding walking action, the virtual boundary is generated according to the outer contour.
4. The robot path planning method according to any one of claims 1 to 3, characterized in that: The determining whether the first walking action of the robot is completed includes: Obtaining a starting position of the first walking action; Obtaining the current position of the robot according to a preset frequency; When the current position coincides with the starting position, it is determined that the first walking action is finished.
5. A robot path planning device, characterized in that: include: A processing module, used for determining whether the first walking action of the robot is completed; An acquisition module, configured to acquire a first walking path of the robot when the first walking action of the robot ends; A first generating module, used for generating a virtual boundary according to the first walking path; A second generating module, used for generating a second walking path according to the virtual boundary; A control module, configured to control the robot to perform a second walking action along the second walking path to bypass the virtual boundary; Wherein, the first generating module is used for: Acquire image information of the first walking path; Extracting a boundary contour of the first walking path according to the image information; wherein the boundary contour includes an inner contour and an outer contour; generating the virtual boundary according to the boundary contour; Wherein, the second generating module is used for: Generating an untraveled area according to the virtual boundary; Determining whether the non-walked area is a real non-walked area; When the non-walked area is a real non-walked area, obtaining a starting target pixel point in the non-walked area that is shortest in distance from the current position of the robot; Taking the starting target pixel point as the starting point, traverse all other non-traveled pixel points in the non-traveled area in a preset direction to generate the second walking path; Wherein, the second generating module is further used for: Taking the initial position of the first walking action as the starting point, sequentially acquiring the position number of each pixel point that has been walked in the first walking action in a preset direction; wherein the position number increases along the preset direction, and the preset direction is the same as the moving direction of the robot; Traversing the walked pixel points adjacent to the non-walked area according to the preset direction; When the position sequence number of the walked pixel point is not increasing, the non-walked area is recorded as a real non-walked area.
6. An electronic device, characterized in that: include: processor; A memory storing a computer program, which, when executed by the processor, enables the processor to execute the robot path planning method according to any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the instructions are executed by a processor, the processor executes the robot path planning method according to any one of claims 1 to 4.
