CN113009911B - Cleaning path generation method and device and self-moving equipment - Google Patents
Cleaning path generation method and device and self-moving equipment Download PDFInfo
- Publication number
- CN113009911B CN113009911B CN202110192384.1A CN202110192384A CN113009911B CN 113009911 B CN113009911 B CN 113009911B CN 202110192384 A CN202110192384 A CN 202110192384A CN 113009911 B CN113009911 B CN 113009911B
- Authority
- CN
- China
- Prior art keywords
- grid
- path
- weight
- sub
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004140 cleaning Methods 0.000 title claims abstract description 97
- 238000000034 method Methods 0.000 title claims abstract description 65
- 230000008569 process Effects 0.000 claims description 12
- 238000003860 storage Methods 0.000 claims description 11
- 238000010408 sweeping Methods 0.000 claims description 5
- 241001417527 Pempheridae Species 0.000 claims description 4
- 238000004891 communication Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000013507 mapping Methods 0.000 description 5
- 230000003993 interaction Effects 0.000 description 4
- 230000004807 localization Effects 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005406 washing Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 101100322581 Caenorhabditis elegans add-1 gene Proteins 0.000 description 1
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009333 weeding Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0231—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
- G05D1/0246—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/20—Scenes; Scene-specific elements in augmented reality scenes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Electromagnetism (AREA)
- Aviation & Aerospace Engineering (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
The specification provides a cleaning path generation method, a cleaning path generation device and a self-moving device. Based on the method, the obtained grid map of the target area to be cleaned is subjected to image recognition, and the object type of an image object represented by each grid in the grid map is determined; setting the weight of each grid according to the object type of the image object represented by the grid based on a preset weight setting rule; meanwhile, determining the unit grid number related to the movement of the mobile equipment and an initial grid in a grid map according to the acquired parameter file; furthermore, based on a preset path generation rule, a clean path which can cover a movable uncleaned area in a target area more finely and comprehensively is efficiently generated by traversing the weight of each grid from the starting grid according to the unit grid number and the weight of each grid, and the technical problems that the generated clean path is poor in coverage and not accurate enough in the existing method are solved.
Description
Technical Field
The specification belongs to the technical field of robots, and particularly relates to a cleaning path generation method and device and self-moving equipment.
Background
Some existing self-moving devices (for example, self-moving robots And the like) are configured with positioning devices such as laser radars And the like, and support the construction of a grid map based on a SLAM (Simultaneous Localization And Mapping) technology.
However, the conventional path generation method based on the SLAM grid map is not designed for a clean scene, so that when the conventional path generation method generates a clean path based on the SLAM grid map, the generated clean path is poor in coverage and cannot be accurate enough.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The specification provides a cleaning path generation method, a cleaning path generation device and self-moving equipment, so that a cleaning path capable of covering a movable uncleaned area in a target area in a finer and more comprehensive mode can be generated efficiently.
The specification provides a method for generating a cleaning path, which is applied to a self-moving device and comprises the following steps:
acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device;
carrying out image recognition on the grid map, and determining the object type of an image object represented by each grid in the grid map;
setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid;
determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map;
based on a preset path generation rule, starting from an initial grid, traversing each grid in the grid map; generating a cleaning path meeting the requirement according to the unit grid number and the weight of each grid; and the ratio of the number of the grids covered by the cleaning path in the grid map is greater than a preset ratio threshold.
In one embodiment, the self-moving device comprises at least one of: automatic sweeper, automatic mopping machine, automatic sweeping and mopping all-in-one.
In one embodiment, where the autonomous mobile device comprises a motor grader, after generating a satisfactory cleaning path, the method further comprises:
generating a corresponding moving instruction and a floor mopping instruction according to the cleaning path;
controlling the self-moving equipment to move along the cleaning path according to the moving instruction; and controlling the self-moving equipment to carry out mopping operation according to the mopping instruction in the moving process.
In one embodiment, the object categories include: movable uncleaned area, movable cleaned area, obstacles, zone boundaries.
In one embodiment, the setting of the weight of each grid in the grid map according to a preset weight setting rule and the object class of the image object represented by each grid comprises:
according to a preset weight rule, setting the weight of a grid of which the object class of the represented image object is a movable uncleaned area as a first weight value, setting the weight of a grid of which the object class of the represented image object is a movable cleaned area as a second weight value, and setting the weight of a grid of which the object class of the represented image object is an area boundary as a third weight value in the grid map; setting the weight of the grid with the object class of the represented image object as the obstacle as a fourth weight value; wherein the first weight value is smaller than a second weight value, the second weight value is smaller than a third weight value, and the third weight value is smaller than or equal to a fourth weight value.
In one embodiment, each grid in the grid map is traversed starting from the initial grid based on a preset path generation rule; and generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid, wherein the cleaning path comprises:
based on a preset path generation rule, starting from the initial grid, finding out a plurality of grids with weights at least smaller than the fourth weight through searching the weights so as to sequentially generate a plurality of sub-paths; wherein the sub-paths comprise a first type of sub-path along a first directional axis and a second type of sub-path along a second directional axis;
and connecting the first type sub-path and the second type sub-path in sequence according to the generation sequence of the sub-paths to obtain a cleaning path meeting the requirement.
In one embodiment, the current first-type sub-path is generated as follows:
acquiring a direction state parameter and an end grid of a previous second-type sub-path;
determining the current retrieval direction according to the direction state parameter of the previous second-class sub-path;
taking the ending grid of the previous second-type sub-path as a current initial grid, and searching the weight of the grid on a first direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid on the first direction axis from the current initial grid along the current searching direction;
when a grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid which is positioned one grid back from a currently searched grid on the first direction axis as a current ending grid;
and generating a path which is along the current retrieval direction and points to the current ending raster from the current initial raster as a current first-class sub-path, and updating the direction state parameter of the previous second-class sub-path to obtain the direction state parameter of the current first-class sub-path.
In one embodiment, the current second-type sub-path is generated as follows:
acquiring a direction state parameter and an ending grid of a previous first-type sub-path;
determining the current retrieval direction according to the direction state parameter of the previous first-type sub-path;
taking the ending grid of the previous first-type sub-path as a current initial grid, and searching the weight of the grid with the unit grid number on the second direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid with the unit grid number on the second direction axis from the current initial grid along the current searching direction;
when it is determined that no grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid after the unit grid number of the current initial grid along the current searching direction on the second direction axis as a current ending grid;
and generating a path which is along the current retrieval direction and points to the current end raster from the current initial raster as a current second-class sub-path, and updating the direction state parameter of the previous first-class sub-path to obtain the direction state parameter of the current second-class sub-path.
The present specification also provides a cleaning path generating apparatus including:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device;
the identification module is used for carrying out image identification on the grid map and determining the object type of the image object represented by each grid in the grid map;
the setting module is used for setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid;
the determining module is used for determining the number of unit grids according to the parameter file and determining an initial grid in the grid map;
the generating module is used for traversing each grid in the grid map from the initial grid based on a preset path generating rule; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; and the proportion of the number of the grids covered by the cleaning path in the grid map is larger than a preset proportion threshold value.
The present specification also provides a self-moving device comprising a processor and a memory for storing processor-executable instructions, the instructions when executed by the processor implementing: acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device; carrying out image recognition on the grid map, and determining the object type of an image object represented by each grid in the grid map; setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid; determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map; based on a preset path generation rule, starting from an initial grid, traversing each grid in the grid map; generating a cleaning path meeting the requirement according to the unit grid number and the weight of each grid; and the ratio of the number of the grids covered by the cleaning path in the grid map is greater than a preset ratio threshold.
According to the method and the device for generating the cleaning path and the self-moving equipment, the object type of the image object represented by each grid in the grid map is determined by firstly carrying out image recognition on the acquired grid map of the target area to be cleaned; setting the weight of each grid according to the object type of the image object represented by the grid based on a preset weight setting rule; meanwhile, determining the unit grid number related to the movement of the mobile equipment and an initial grid in a grid map according to the acquired parameter file; furthermore, based on a preset path generation rule, a clean path which can cover a movable uncleaned area in a target area more finely and comprehensively is efficiently generated by traversing the weight of each grid from the starting grid according to the unit grid number and the weight of each grid, and the technical problems that the generated clean path is poor in coverage and not accurate enough in the existing method are solved.
Drawings
In order to more clearly illustrate the embodiments of the present specification, the drawings needed to be used in the embodiments will be briefly described below, and the drawings in the following description are only some of the embodiments described in the present specification, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic diagram of an embodiment of a scenario in which a method for generating a cleaning path provided by an embodiment of the present disclosure is applied;
FIG. 2 is a flow diagram of a method for generating a cleaning path provided by one embodiment of the present description;
fig. 3 is a schematic structural component diagram of a self-moving device provided in an embodiment of the present specification;
FIG. 4 is a schematic structural diagram of a device for generating a cleaning path according to an embodiment of the present disclosure
Fig. 5 is a schematic diagram of an embodiment of a method for generating a cleaning path provided by an embodiment of the present specification, in an example scenario.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without making any creative effort shall fall within the protection scope of the present specification.
In consideration of the fact that the existing path generation method is not designed for a clean scene, the situation that a movable uncleaned area in a target area to be cleaned cannot be covered comprehensively and finely when a clean path is generated by using a grid map based on a SLAM is prone to occur, and further the subsequent cleaning effect is influenced.
For the root cause of the above problem, the present specification considers that after a grid map including a target area to be cleaned is constructed and acquired by using a SLAM technology, image recognition may be performed on the grid map first to determine an object class of an image object represented by pixels included in each grid in the grid map; and further, different object categories such as obstacles, area boundaries, movable uncleaned areas and the like can be finely distinguished according to the object categories, and corresponding weights are set for the grids to obtain a grid map carrying the weights. Meanwhile, a parameter file associated with the grid map can be obtained, and the number of unit grids and the initial grid in the grid map can be determined according to the parameter file.
Furthermore, based on a preset path generation rule, starting from the initial grid, each grid in the grid map is searched and traversed, and a plurality of sub-paths sequentially connected in sequence are generated according to the number of unit grids and the weight of each grid, so that a clean path capable of covering a movable uncleaned area in the target area more finely and comprehensively is obtained. And then can be based on the above-mentioned clean route removal control from mobile device removal, control simultaneously from mobile device in the removal in-process cleaning operation, obtain better cleaning performance.
The method for generating the cleaning path provided by the embodiment of the present specification can be specifically applied to a self-moving device. As can be seen in particular in fig. 1. The self-moving equipment can be an automatic sweeper, an automatic mopping machine or an automatic sweeping and mopping integrated machine and the like.
In this scenario example, taking a mobile device as an automatic floor-cleaning machine as an example, the automatic floor-cleaning machine may specifically include: the device comprises a signal transceiver, a processor, a positioning assembly, a mopping assembly, a moving assembly and the like. The signal transceiver can be used for data interaction with a user terminal used by a user. Furthermore, the signal transceiver can also perform data interaction with a cloud server. The positioning components described above, such as single line lidar and the like, may be used for device positioning and mapping. The processor described above may be used to perform specific data processing. The movement assembly may be used to execute corresponding instructions to move the robotic vehicle. The above-described mopping machine assembly may be used to execute instructions to perform specific task tasks, such as mopping a floor.
The user terminal may specifically include a user side that is applied to a user side and can implement functions such as data acquisition and data transmission. Specifically, the user terminal may be, for example, a desktop computer, a tablet computer, a notebook computer, a smart phone, and the like. Alternatively, the user terminal may be a software application capable of running in the electronic device. For example, it may be an APP running on a smartphone that is tied to a motor grader, or the like. The signal transceiver of the mopping machine can be connected with the user terminal in a wired or wireless mode to perform specific data interaction.
Correspondingly, the user can generate and send corresponding instructions to the automatic mopping machine through the user terminal, and correspondingly control the movement and work of the automatic mopping machine.
In this scenario example, referring to fig. 1, when a user wants to mop and clean a living room area (i.e., a target area to be cleaned), a corresponding trigger instruction may be generated and sent to the automatic floor mopping machine by performing a corresponding operation on a user terminal.
The automatic mopping machine receives and responds to the trigger instruction, firstly calls a single-line laser radar to scan a target area, and constructs a grid map for a living room area based on SLAM technology and radar scanning data; meanwhile, the automatic mopping machine can also acquire a parameter file associated with the grid map.
Then, the automatic mopping machine can perform image recognition processing on the grid map so as to determine the object type of the image object represented by each grid in the grid map.
Furthermore, the automatic mopping machine can set corresponding weights for each grid in the grid map according to a preset weight rule and the object class of the image object represented by each grid. Meanwhile, the automatic floor mopping machine can determine unit grid data according to the size parameters of the grid map, the size parameters of the mobile equipment and the like contained in the parameter file; and determining the starting grid in the grid map according to the position parameters of the mobile equipment contained in the parameter file.
Then, the automatic floor mopping machine can traverse each grid in the grid map from the initial grid based on a preset path generation rule; generating a plurality of sub-paths such as a first type sub-path along a first direction axis (for example, an X axis) and a second type sub-path along a second direction axis (for example, a Y axis) which are connected at intervals in a certain sequence according to the number of the unit grids and the weight of each grid; and then, the plurality of sub paths are sequentially connected according to the generation sequence of the sub paths, so that a cleaning path capable of better covering a movable area to be cleaned in the living room area is obtained.
Further, the automatic floor mopping machine may generate movement instructions and floor mopping instructions. Controlling the automatic floor mopping machine to move according to the cleaning path by executing a moving instruction; and the automatic floor mopping machine is controlled by executing the floor mopping command during moving, and the floor mopping operation is carried out by the floor mopping assembly.
Therefore, the automatic floor mopping machine can respond to the trigger instruction of the user, can efficiently and comprehensively automatically complete floor mopping cleaning work aiming at the living room area, and obtains better cleaning effect.
Referring to fig. 2, an embodiment of the present disclosure provides a method for generating a cleaning path. The method can be particularly applied to the mobile equipment side. In particular implementations, the method may include the following.
S201: acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device.
In one embodiment, the method described above may be applied in particular to a self-moving device. The self-moving device may be specifically understood as an electronic device that can automatically move and automatically complete corresponding task operations.
In one embodiment, the self-moving device may be a self-moving device for cleaning work. Specifically, the self-moving device may include at least one of: an automatic sweeper (or called sweeping robot), an automatic mopping machine (or called mopping robot), an automatic sweeping and mopping integrated machine and the like. Of course, the above-listed self-moving devices are merely illustrative. In specific implementation, the self-moving device may further include other types of self-moving devices according to specific application scenarios and processing requirements. The present specification is not limited to these.
In one embodiment, the target area may be specifically understood as an area to be cleaned, which is designated from the mobile device. Specifically, the target area may be a kitchen area to be cleaned, a bedroom area to be cleaned, a dining room area to be cleaned, a living room area to be cleaned, or the like.
In an embodiment, the obtaining of the grid map of the target area to be cleaned may include: and receiving and responding to a trigger instruction sent by the user terminal from the mobile equipment, calling the single-line laser radar to scan the target area, and constructing and obtaining the grid map based on the SLAM.
The SLAM may specifically refer to a Simultaneous Localization And Mapping (Simultaneous Localization And Mapping) technology, and based on the technology, the problems of Localization And Mapping when the self-moving device operates in an unknown environment can be effectively solved.
In this embodiment, when a user uses the self-moving device to perform a cleaning operation in a target area for the first time, the self-moving device may be first placed in the target area to be cleaned, and a user terminal, for example, a mobile phone used by the user, which is bound with the self-moving device in advance is used to perform a corresponding operation, generate and send a corresponding trigger instruction (for example, an initialization instruction) to the self-moving device. At this time, the self-mobile device can receive and respond to the initialization instruction, and trigger the grid map related to the target area to be constructed and generated in the manner described above.
In one embodiment, a grid map of a target area to be cleaned is obtained, and a parameter file related to the grid map is also obtained. The parameter file may at least include a dimension parameter of the grid map, a dimension parameter of the mobile device, a location parameter of the mobile device, and the like.
S202: and carrying out image recognition on the grid map, and determining the object type of the image object represented by each grid in the grid map.
In this embodiment, the self-moving device may perform image recognition on the grid map to determine the image object represented by the pixel in each grid in the grid map, and further determine the object type of the image object represented by each grid.
In an embodiment, the image recognition of the grid map may be implemented specifically as follows: and calling a pre-trained image recognition model to perform image recognition processing on the grid map so as to determine the object types of the image objects respectively represented by each grid in the grid map.
In an embodiment, the object category may specifically include: movable uncleaned areas, movable cleaned areas, obstacles, zone boundaries, and the like.
In this embodiment, the obstacle may be specifically understood as an object that causes a blockage to the movement of the self-moving device in the current area, and therefore the self-moving device cannot directly move past the object. Such as a sofa in the living room area, a bed in the bedroom area, etc. The movable uncleaned area is specifically understood to be an area where no obstacle exists in the target area, the mobile device can move past the target area, and the cleaning operation is not performed yet. The movable cleaned area may be specifically understood as an area where no obstacle exists in the target area, the self-moving apparatus can move past, and the cleaning operation has been performed. The above-mentioned area boundary is understood in particular as the boundary between the target area to be cleaned and the other non-target areas. Such as walls, doorsills, etc.
In this embodiment, the image recognition model may be specifically understood as a neural network model that is established in advance by learning a large number of sample grid maps containing common areas to be cleaned, and that is capable of recognizing image objects represented by each grid in the grid maps and determining corresponding object types.
S203: and setting the weight of each grid in the grid map according to a preset weight setting rule and the object class of the image object represented by each grid.
In an embodiment, the setting of the weight of each grid in the grid map according to the preset weight setting rule and the object class of the image object represented by each grid may include: according to a preset weight rule, setting the weight of a grid of which the object class of the represented image object is a movable uncleaned area as a first weight value, setting the weight of a grid of which the object class of the represented image object is a movable cleaned area as a second weight value, and setting the weight of a grid of which the object class of the represented image object is an area boundary as a third weight value in the grid map; setting the weight of the grid with the object class of the represented image object as the obstacle as a fourth weight value; wherein the first weight value is smaller than a second weight value, the second weight value is smaller than a third weight value, and the third weight value is smaller than or equal to a fourth weight value.
According to the preset weight rule, when the weight value is specifically set, the fourth weight value corresponding to the obstacle may be set to 255, and the third weight value corresponding to the area boundary may also be set to 255. A first weight value corresponding to the movable uncleaned area is set to a minimum value of 0, and a second weight value corresponding to the movable cleaned area is set to 50.
Therefore, the grids corresponding to different object types can be effectively distinguished through the weights, and the priorities of the grids which do not correspond to the different object types are marked finely by the weights, so that when a path is generated in the following process, the grids corresponding to the movable uncleaned area can be acquired and covered preferentially according to the weights of the grids to obtain a specific path.
S204: and determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map.
In an embodiment, the determining the number of unit grids according to the parameter file may include: calculating the number of grids covered by the length of the self-moving equipment and/or grid data covered by the width of the self-moving equipment according to the size parameters of the grid map and the size parameters of the self-moving equipment; and determining the corresponding unit grid number according to the grid number covered by the length and/or the grid number covered by the width of the mobile equipment.
In an embodiment, during implementation, according to the location parameter of the mobile device in the parameter file, in combination with the location information reflected by the grid map, the grid in which the mobile device is currently located is determined in the grid map as the starting grid.
S205: traversing each grid in the grid map from the initial grid based on a preset path generation rule; and generating a cleaning path meeting the requirement according to the unit grid number and the weight of each grid.
And the proportion of the number of the grids covered by the satisfactory cleaning path in the grid map is greater than a preset proportion threshold value.
In an embodiment, the step of traversing each grid in the grid map starting from the initial grid based on a preset path generation rule; and generating a cleaning path according to the unit grid number and the weight of each grid, wherein the specific implementation can include the following contents.
S1: based on a preset path generation rule, starting from the initial grid, finding out a plurality of grids with weights at least smaller than the fourth weight through searching the weights so as to sequentially generate a plurality of sub-paths; wherein the sub-paths comprise a first type of sub-path along a first directional axis and a second type of sub-path along a second directional axis;
s2: and sequentially connecting the first type sub-path and the second type sub-path according to the generation sequence of the sub-paths to obtain a cleaning path meeting the requirement.
In one embodiment, the first direction axis may be an X axis, and correspondingly, the second direction axis may be a Y axis. Of course, the first direction axis may be the Y axis, and the second direction axis may be the X axis.
In the present embodiment, the first direction axis is an X axis, and the second direction axis is a Y axis. For the case that the first direction axis is the Y axis and the second direction axis is the X axis, the following embodiments may be referred to, and details are not described in this specification.
In this embodiment, in specific implementation, according to a preset path generation rule, a plurality of sub paths may be generated in the following order: firstly, generating a first type sub-path, and then generating a second type sub-path; and then generating the first type sub-path and the second type sub-path for repeating. Wherein, a common grid exists between the adjacent first-type sub-paths and second-type sub-paths.
In this embodiment, after the plurality of sub-paths are generated in the above manner, two adjacent sub-paths may be sequentially connected according to the generation order of each sub-path, so as to obtain a complete path, which is used as the cleaning path. Specifically, when connecting, a common grid between two adjacent sub-paths can be determined, and the connection is performed through the common grid.
In an embodiment, taking the generation of any one current first-type sub-path in the plurality of first-type sub-paths as an example, the current first-type sub-path may be generated as follows: acquiring a direction state parameter and an end grid of a previous second-type sub-path; determining the current retrieval direction according to the direction state parameter of the previous second-class sub-path; taking the ending grid of the previous second-type sub-path as a current initial grid, and searching the weight of the grid on a first direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid on the first direction axis from the current initial grid along the current searching direction; when a grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid which is positioned one grid back from a currently searched grid on the first direction axis as a current ending grid; and generating a path which is along the current retrieval direction and points to the current ending raster from the current initial raster as a current first-class sub-path, and updating the direction state parameter of the previous second-class sub-path to obtain the direction state parameter of the current first-class sub-path.
After the current first-type sub-path is generated in the above manner, a subsequent second-type sub-path may be generated according to a preset path generation rule.
In an embodiment, taking the generation of any current second-type sub-path in the plurality of second-type sub-paths as an example, the current second-type sub-path may be generated as follows: acquiring a direction state parameter and an end grid of a previous first-type sub-path; determining the current retrieval direction according to the direction state parameter of the previous first-type sub-path; taking the ending grid of the previous first-type sub-path as a current initial grid, and searching the weight of the grid with the unit grid number on the second direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid with the unit grid number on the second direction axis from the current initial grid along the current searching direction; when it is determined that no grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid after the unit grid number of the current initial grid along the current searching direction on the second direction axis as a current ending grid; and generating a path which is along the current retrieval direction and points to the current ending raster from the current initial raster as a current second-class sub-path, and updating the direction state parameter of the previous first-class sub-path to obtain the direction state parameter of the current second-class sub-path.
After the current second-type sub-path is generated in the above manner, a subsequent first-type sub-path may be generated according to a preset path generation rule.
In one embodiment, when the current second-type sub-path is specifically generated, the method may further include the following: when the retrieved grids with the weights equal to the fourth weight value or the third weight value are determined, taking the grids after the current initial grid returns one grid along the previous first-type sub-path as the corrected current initial grids; and searching the weight of the unit-grid-number grid on the second direction axis from the corrected current initial grid along the current searching direction, and the weight of the unit-grid-number grid in the vertical direction of the single-grid-number grid on the second direction axis.
In one embodiment, the retrieval direction may specifically include a forward direction and a reverse direction. Specifically, when the first-type sub-path is generated, the search direction may be a forward direction along the X axis or a reverse direction along the X axis; in generating the second type sub-path, the search direction may be a forward direction along the Y-axis or a reverse direction along the Y-axis.
In an embodiment, the updating the direction state parameter may specifically include performing an add-1 operation on the basis of the direction state parameter of the previous sub-path.
In an embodiment, the determining the retrieval direction according to the direction state parameter may include: detecting the parity of the direction state parameter of the previous sub-path, and determining that the retrieval direction is the forward direction when the direction state parameter is determined to be an even number; and when the direction state parameter is determined to be an odd number, determining that the retrieval direction is negative.
In one embodiment, in the process of specifically generating the sub-paths in the above manner, the grid with a small coverage weight value may be selected by the wire to generate the corresponding sub-path according to the weight of the grid. At the same time, it is also permissible, if necessary, to cover the grid with the weight of the second weight value, that is, the grid corresponding to the movable cleaned area, in the process of generating the sub path.
By the above example, a plurality of first-type sub-paths along a first direction axis and second-type sub-paths along a second direction axis, in which a common grid exists, may be generated at intervals; and connecting the adjacent first-type sub-paths and second-type sub-paths by using a common grid between the adjacent sub-paths according to the generation sequence, so that a cleaning path which is better in coverage and more accurate and meets the requirement can be obtained.
In one embodiment, for example, the mobile device may start from the starting grid P0, perform grid weight search in the forward direction along the X axis (the first direction axis) until a grid with a weight of 255 (for example, a grid located at the boundary of the area) is searched, and use the previous grid P1 (the grid with a weight of 0) of the grid as the ending grid, thereby generating a first type sub-path from P0 to P1, which is denoted as P0P1. Meanwhile, the original direction state parameter is updated by +1.
Then, based on the grid map, starting from the grid P1, according to the direction state parameter, determining the forward direction along the Y axis (second direction axis), traversing m grids (unit grid number), determining the weight of the grid P2 as 0, and then taking P2 as an end grid, and further generating a second type sub-path from P1 to P2, which is denoted as P1P2. Meanwhile, the +1 updating is carried out on the direction state parameter.
Further, a first type sub-path from P2 to P3, denoted as P2P3, may be generated by determining a direction along the X axis based on the direction state parameter, performing a weight search of the grid until a grid with a weight of 255 (for example, a grid corresponding to an obstacle) is searched, stopping the search, and setting a previous grid P3 (grid with a weight of 0) of the grid as an end grid. Meanwhile, the +1 updating is carried out on the direction state parameter.
Repeating in the above manner, the sequential generation may be continued to obtain, for example: P3P4, P4P5 … … Pn-1Pn, etc. And connecting the plurality of sub-paths with the sub-paths P0P1 and P1P2 generated before through a shared grid with adjacent sub-path diameters according to the path generation sequence to obtain an arched total path which sequentially passes through P1, P2 … … Pn-1 and Pn from P0 and serves as a required cleaning path.
In one embodiment, after generating the satisfactory cleaning path, when the method is implemented, the method may further include: searching the grid map, and determining whether a clean path is not covered and the object type of the represented image object is a missing area of a movable uncleaned area; detecting whether the number of grids contained in the leakage area is larger than or equal to the number of unit grids; when it is detected that the number of grids included in the missing region is greater than or equal to the number of unit grids, a supplementary path for covering the missing region may be generated by taking the end grid of the cleaning path as a current initial point. And the supplementary path is spliced with the previously generated cleaning path, so that a cleaning path with higher coverage and more accuracy can be obtained.
In an embodiment, after generating the cleaning path meeting the requirement, when the method is implemented, the method may further include: receiving and responding to a cleaning instruction, and controlling the self-moving equipment to move in the target area based on the cleaning path; and cleaning work is performed during the movement. Therefore, the movable cleaning area in the target area can be well cleaned based on the cleaning path, and a good cleaning effect is obtained.
In one embodiment, in a case where the autonomous mobile device includes a motor grader, after the generating of the satisfactory cleaning path, the method may be further implemented by: generating a corresponding moving instruction and a floor mopping instruction according to the cleaning path; controlling the self-moving equipment to move along the cleaning path according to the moving instruction; and controlling the self-moving equipment to carry out mopping operation according to the mopping instruction in the moving process.
As can be seen from the above, in the method for generating a cleaning path provided in the embodiments of the present specification, the object type of the image object represented by each grid in the grid map is determined by performing image recognition on the obtained grid map of the target area to be cleaned; setting the weight of each grid according to the object type of the image object represented by the grid based on a preset weight setting rule; meanwhile, determining the number of unit grids and an initial grid in a grid map according to the acquired parameter file; furthermore, based on a preset path generation rule, a clean path which can cover a movable uncleaned area in a target area more finely and comprehensively is efficiently generated by traversing the weight of each grid from the starting grid according to the unit grid number and the weight of each grid, and the technical problems that the generated clean path is poor in coverage and not accurate enough in the existing method are solved. Furthermore, the self-moving equipment can move in the target area according to the cleaning path and perform cleaning operation in the moving process, so that the cleaning work on the target area can be completed more efficiently and comprehensively, and a better cleaning effect is obtained.
Embodiments of the present specification further provide a self-moving device, including a processor and a memory for storing processor-executable instructions, where the processor, when implemented, may perform the following steps according to the instructions: acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device; carrying out image recognition on the grid map, and determining the object type of an image object represented by each grid in the grid map; setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid; determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map; based on a preset path generation rule, starting from an initial grid, traversing each grid in the grid map; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; and the proportion of the number of the grids covered by the cleaning path in the grid map is larger than a preset proportion threshold value.
In order to more accurately complete the above instructions, referring to fig. 3, another specific self-moving device is provided in the embodiments of the present specification, wherein the self-moving device includes a network communication port 301, a processor 302, and a memory 303, and the structures are connected by an internal cable, so that the structures can perform specific data interaction.
The network communication port 301 may be specifically configured to obtain a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device.
The processor 302 may be specifically configured to perform image recognition on the grid map, and determine an object type of an image object represented by each grid in the grid map; setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid; determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map; traversing each grid in the grid map from the initial grid based on a preset path generation rule; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; and the proportion of the number of the grids covered by the cleaning path in the grid map is larger than a preset proportion threshold value.
The memory 303 may be specifically configured to store a corresponding instruction program.
In this embodiment, the network communication port 301 may be a virtual port that is bound to different communication protocols, so that different data can be sent or received. For example, the network communication port may be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for mail data communication. In addition, the network communication port can also be a communication interface or a communication chip of an entity. For example, it may be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it may also be a bluetooth chip.
In this embodiment, the processor 302 may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The description is not intended to be limiting.
In this embodiment, the memory 303 may include multiple layers, and in a digital system, the memory may be any memory as long as binary data can be stored; in an integrated circuit, a circuit without a physical form and with a storage function is also called a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form is also called a memory, such as a memory bank, a TF card and the like.
The present specification further provides a computer storage medium based on the above cleaning path generation method, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the computer storage medium implements: acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the raster map, a dimension parameter of the mobile device and a position parameter of the mobile device; carrying out image recognition on the grid map, and determining the object type of an image object represented by each grid in the grid map; setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid; determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map; traversing each grid in the grid map from the initial grid based on a preset path generation rule; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; and the proportion of the number of the grids covered by the cleaning path in the grid map is larger than a preset proportion threshold value.
In this embodiment, the storage medium includes, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk (HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, functions and effects specifically realized by the program instructions stored in the computer storage medium may be explained in comparison with other embodiments, and are not described herein again.
Referring to fig. 4, on a software level, the embodiment of the present specification further provides a device for generating a cleaning path, which may specifically include the following structural modules.
The acquiring module 401 may be specifically configured to acquire a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the raster map, a dimension parameter of the mobile device and a position parameter of the mobile device;
the identifying module 402 may be specifically configured to perform image identification on the grid map, and determine an object type of an image object represented by each grid in the grid map;
the setting module 403 may be specifically configured to set a weight of each grid in the grid map according to a preset weight setting rule and an object category of an image object represented by each grid;
the determining module 404 may be specifically configured to determine the number of unit grids according to the parameter file, and determine an initial grid in the grid map;
the generating module 405 may be specifically configured to traverse each grid in the grid map from the starting grid based on a preset path generation rule; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; and the proportion of the number of the grids covered by the cleaning path in the grid map is larger than a preset proportion threshold value.
In one embodiment, the apparatus may further include a work module, which may be specifically configured to generate a corresponding movement instruction and a floor mopping instruction according to the cleaning path; controlling the self-moving equipment to move along the cleaning path according to the moving instruction; and controlling the self-moving equipment to carry out mopping operation according to the mopping instruction in the moving process.
In an embodiment, the setting module 403 may be specifically configured to set, according to a preset weight rule, a weight of a grid of an uncleaned area where an object class of the characterized image object is movable in the grid map as a first weight value, set a weight of a grid of a cleaned area where the object class of the characterized image object is movable in the grid map as a second weight value, and set a weight of a grid of an area boundary where the object class of the characterized image object is movable as a third weight value; setting the weight of the grid with the object class of the represented image object as the obstacle as a fourth weight value; wherein the first weight value is smaller than a second weight value, the second weight value is smaller than a third weight value, and the third weight value is smaller than or equal to a fourth weight value.
In an embodiment, the generating module 405 may be specifically configured to find out multiple grids with weights at least smaller than a fourth weight by retrieving weights from a starting grid based on a preset path generating rule, so as to sequentially generate multiple sub-paths; wherein the sub-paths comprise a first type of sub-path along a first directional axis and a second type of sub-path along a second directional axis; and connecting the first type sub-path and the second type sub-path in sequence according to the generation sequence of the sub-paths to obtain a cleaning path meeting the requirement.
In an embodiment, the generating module 405 may obtain a direction state parameter and an end grid of a previous second-type sub-path when a current first-type sub-path in the first-type sub-paths is specifically generated; determining the current retrieval direction according to the direction state parameter of the previous second-class sub-path; taking the ending grid of the previous second-type sub-path as a current initial grid, and searching the weight of the grid on a first direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid on the first direction axis from the current initial grid along the current searching direction; when a grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid which is positioned one grid back from a currently searched grid on the first direction axis as a current ending grid; and generating a path which is along the current retrieval direction and points to the current ending raster from the current initial raster as a current first-class sub-path, and updating the direction state parameter of the previous second-class sub-path to obtain the direction state parameter of the current first-class sub-path.
In an embodiment, when specifically generating the current second-type sub path in the second-type sub paths, the generating module 405 may obtain a direction state parameter and an end grid of a previous first-type sub path; determining the current retrieval direction according to the direction state parameter of the previous first-type sub-path; taking the ending grid of the previous first-type sub-path as a current initial grid, and searching the weight of the grid with the unit grid number on the second direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid with the unit grid number on the second direction axis from the current initial grid along the current searching direction; when it is determined that no grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid after the unit grid number of the current initial grid along the current searching direction on the second direction axis as a current ending grid; and generating a path which is along the current retrieval direction and points to the current end raster from the current initial raster as a current second-class sub-path, and updating the direction state parameter of the previous first-class sub-path to obtain the direction state parameter of the current second-class sub-path.
It should be noted that, the units, devices, modules, etc. illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, which are described separately. It is to be understood that, in implementing the present specification, functions of each module may be implemented in one or more pieces of software and/or hardware, or a module that implements the same function may be implemented by a combination of a plurality of sub-modules or sub-units, or the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
As can be seen from the above, the device for generating a cleaning path provided in the embodiments of the present disclosure can efficiently generate a cleaning path that can cover a movable uncleaned area in a target area more finely and comprehensively.
In one particular scenario example, the methods provided herein may be applied to generate a corresponding cleaning path to clean a cleaning region (e.g., a target region). Referring to fig. 5, the implementation may include the following steps.
S1: establishing a grid map of a cleaning area through a single-line laser radar, and storing the grid map into a picture; and storing the resolution represented by each pixel corresponding to the picture and the actual environment and the position information of the starting point pixel into a parameter file.
S2: and loading the pictures and the parameter files of the grid map by the program, acquiring the relevant information of the size of the floor washing machine, and calculating the number m (for example, the number of unit grids) of the grid map occupied by the robot.
S3: a certain weight is given to the grid in the grid map, it may be assumed that the area to be cleaned is 0 (e.g., a first weight value), the wall or the obstacle is 255 (e.g., a third weight value, a fourth weight value), the robot is moved from the start position P0 to an extreme position P1 (assuming that both are minimum values) along the x axis (e.g., a first direction axis) and along the y axis (e.g., a second direction axis), and the direction status (e.g., an initial direction status parameter) is set to 0.
S4: acquiring m grids in the positive direction of the y axis, sequentially traversing and analyzing in the positive direction of the x axis, weighting the m grids if the weights of the m grids are all initial weights, assuming +50 (for example, a second weight value) until an environment edge (such as a wall or an obstacle), recording the last position P2, and adding P1P2 (for example, a sub-path) into a path queue, wherein the direction state is +1.
S5: and analyzing the m grid weights of the P2 along the positive direction of the y axis, and if the grid weights are the non-cleaned area, moving the robot along the positive direction of the y axis for m grid grids, and marking the grid as P3.
S6: acquiring the current direction state, and if the current direction state is an even number, sequentially traversing along the positive direction of the x axis; and otherwise, sequentially traversing along the negative direction of the x axis, analyzing the weights of the m grids until an obstacle or a cleaned area is met, marking as P4, adding P3P4 into a path queue, and keeping the direction state at +1.
S7: and (5) repeating the steps S5 and S6 continuously, adding the Pn +1 calculated in the process into the path queue until the grid weight of a certain point along the positive direction of the y axis is a wall or an obstacle, and forming an arched advancing route.
S8: the weight distribution of the entire grid map is analyzed to determine an uncleaned area, and if the uncleaned area exceeds a set threshold, the grid map of the uncleaned area portion is subjected to the operations of steps S3, S4, S5, S6 and S7, so that a washing path (i.e., a cleaning path) covering the whole washing area can be generated.
Through the scene example, a corresponding grid map can be generated based on SLAM, and a relatively accurate algorithm is realized to plan a cleaning path which can enable the floor cleaning machine to fully cover a cleaning area through analyzing the environment outline.
It should be noted that other modifications, such as applying the above-mentioned method for generating a clean path to the field of automatic weeding, are also possible for those skilled in the art in light of the technical spirit of the present application, but they should be covered by the scope of the present application as long as they achieve the same or similar functions and effects as the present application.
Although the present specification provides method steps as described in the examples or flowcharts, additional or fewer steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an apparatus or client product in practice executes, it may execute sequentially or in parallel (e.g., in a parallel processor or multithreaded processing environment, or even in a distributed data processing environment) according to the embodiments or methods shown in the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in processes, methods, articles, or apparatus that include the recited elements is not excluded. The terms first, second, etc. are used to denote names, but not any particular order.
Those skilled in the art will also appreciate that, in addition to implementing the controller in purely computer readable program code means, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions in this specification may be essentially embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments in this specification.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. The description is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification without departing from the spirit of the specification, and it is intended that the appended claims encompass such variations and modifications without departing from the spirit of the specification.
Claims (7)
1. A method for generating a cleaning path, which is applied to a self-moving device, and comprises the following steps:
acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the grid map, a dimension parameter of the mobile device and a position parameter of the mobile device;
carrying out image recognition on the grid map, and determining the object type of an image object represented by each grid in the grid map;
setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid; the method comprises the following steps: according to a preset weight rule, setting the weight of a grid of which the object class of the represented image object is a movable uncleaned area as a first weight value, setting the weight of a grid of which the object class of the represented image object is a movable cleaned area as a second weight value, and setting the weight of a grid of which the object class of the represented image object is an area boundary as a third weight value in the grid map; setting the weight of the grid with the object class of the represented image object as the obstacle as a fourth weight value; wherein the first weight value is less than a second weight value, the second weight value is less than a third weight value, and the third weight value is less than or equal to a fourth weight value;
determining the number of unit grids according to the parameter file, and determining an initial grid in the grid map;
traversing each grid in the grid map from the initial grid based on a preset path generation rule; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; the method comprises the following steps: based on a preset path generation rule, starting from the initial grid, finding out a plurality of grids with weights at least smaller than the fourth weight through searching the weights so as to sequentially generate a plurality of sub-paths; wherein the sub-paths comprise a first type of sub-path along a first directional axis and a second type of sub-path along a second directional axis; sequentially connecting the first type sub-path and the second type sub-path according to the generation sequence of the sub-paths to obtain a clean path meeting the requirement;
generating a current first-class sub-path according to the following modes:
acquiring a direction state parameter and an end grid of a previous second-type sub-path;
determining the current retrieval direction according to the direction state parameter of the previous second-class sub-path;
taking the ending grid of the previous second-type sub-path as a current initial grid, and searching the weight of the grid on a first direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid on the first direction axis from the current initial grid along the current searching direction;
when a grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid which is positioned one grid back from a currently searched grid on the first direction axis as a current ending grid;
and generating a path which is along the current retrieval direction and points to the current ending raster from the current initial raster as a current first-class sub-path, and updating the direction state parameter of the previous second-class sub-path to obtain the direction state parameter of the current first-class sub-path.
2. The method of claim 1, wherein the self-moving device comprises at least one of: automatic sweeper, automatic mopping machine, automatic sweeping and mopping all-in-one.
3. The method of claim 2, wherein, where the self-moving device comprises a motor grader, after generating a satisfactory cleaning path, the method further comprises:
generating a corresponding moving instruction and a floor mopping instruction according to the cleaning path;
controlling the self-moving equipment to move along the cleaning path according to the moving instruction; and controlling the self-moving equipment to carry out mopping operation according to the mopping instruction in the moving process.
4. The method of claim 1, wherein the object categories comprise: movable uncleaned area, movable cleaned area, obstacles, zone boundaries.
5. The method of claim 4, wherein the current second type of sub-path is generated by:
acquiring a direction state parameter and an end grid of a previous first-type sub-path;
determining the current retrieval direction according to the direction state parameter of the previous first-type sub-path;
taking the ending grid of the previous first-type sub-path as a current initial grid, and searching the weight of the grid with the unit grid number on the second direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid with the unit grid number on the second direction axis from the current initial grid along the current searching direction;
when it is determined that no grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid after the unit grid number of the current initial grid along the current searching direction on the second direction axis as a current ending grid;
and generating a path which is along the current retrieval direction and points to the current end raster from the current initial raster as a current second-class sub-path, and updating the direction state parameter of the previous first-class sub-path to obtain the direction state parameter of the current second-class sub-path.
6. A cleaning path generating apparatus, comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a grid map of a target area to be cleaned and a parameter file related to the grid map; the parameter file at least comprises a dimension parameter of the raster map, a dimension parameter of the mobile device and a position parameter of the mobile device;
the identification module is used for carrying out image identification on the grid map and determining the object type of the image object represented by each grid in the grid map;
the setting module is used for setting the weight of each grid in the grid map according to a preset weight setting rule and the object type of the image object represented by each grid; the method comprises the following steps: according to a preset weight rule, setting the weight of a grid of which the object class of the represented image object is a movable uncleaned area as a first weight value, setting the weight of a grid of which the object class of the represented image object is a movable cleaned area as a second weight value, and setting the weight of a grid of which the object class of the represented image object is an area boundary as a third weight value in the grid map; setting the weight of the grid with the object class of the represented image object as the obstacle as a fourth weight value; wherein the first weight value is less than a second weight value, the second weight value is less than a third weight value, and the third weight value is less than or equal to a fourth weight value;
the determining module is used for determining the number of unit grids according to the parameter file and determining an initial grid in the grid map;
the generating module is used for traversing each grid in the grid map from the initial grid based on a preset path generating rule; generating a cleaning path meeting the requirements according to the unit grid number and the weight of each grid; the method comprises the following steps: based on a preset path generation rule, starting from the initial grid, finding out a plurality of grids with weights at least smaller than the fourth weight through searching the weights so as to sequentially generate a plurality of sub-paths; wherein the sub-paths comprise a first type of sub-path along a first directional axis and a second type of sub-path along a second directional axis; sequentially connecting the first type sub-path and the second type sub-path according to the generation sequence of the sub-paths to obtain a clean path meeting the requirement;
generating a current first-class sub-path according to the following modes:
acquiring a direction state parameter and an end grid of a previous second-type sub-path;
determining the current retrieval direction according to the direction state parameter of the previous second-class sub-path;
taking the ending grid of the previous second-type sub-path as a current initial grid, and searching the weight of the grid on a first direction axis and the weight of the grid with the unit grid number in the vertical direction of the grid on the first direction axis from the current initial grid along the current searching direction;
when a grid with the weight equal to the fourth weight value or the third weight value is searched, determining a grid which is positioned one grid back from a currently searched grid on the first direction axis as a current ending grid;
and generating a path which is along the current retrieval direction and points to the current ending raster from the current initial raster as a current first-class sub-path, and updating the direction state parameter of the previous second-class sub-path to obtain the direction state parameter of the current first-class sub-path.
7. A self-moving device comprising a processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the steps of the method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110192384.1A CN113009911B (en) | 2021-02-20 | 2021-02-20 | Cleaning path generation method and device and self-moving equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110192384.1A CN113009911B (en) | 2021-02-20 | 2021-02-20 | Cleaning path generation method and device and self-moving equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113009911A CN113009911A (en) | 2021-06-22 |
CN113009911B true CN113009911B (en) | 2022-11-01 |
Family
ID=76404063
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110192384.1A Active CN113009911B (en) | 2021-02-20 | 2021-02-20 | Cleaning path generation method and device and self-moving equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113009911B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5006988A (en) * | 1989-04-28 | 1991-04-09 | University Of Michigan | Obstacle-avoiding navigation system |
CN106840168A (en) * | 2017-03-16 | 2017-06-13 | 苏州大学 | Complete coverage path planning method under clean robot and its dynamic environment |
CN107357295A (en) * | 2017-08-16 | 2017-11-17 | 珠海市微半导体有限公司 | A kind of method for searching path and chip and robot based on grating map |
CN107773164A (en) * | 2017-11-17 | 2018-03-09 | 北京奇虎科技有限公司 | Clean method, device and robot for clean robot |
CN110141164A (en) * | 2019-06-13 | 2019-08-20 | 深圳市银星智能科技股份有限公司 | A kind of area recognizing method, door region recognition system and clean robot |
CN110456789A (en) * | 2019-07-23 | 2019-11-15 | 中国矿业大学 | A kind of complete coverage path planning method of clean robot |
CN110595482A (en) * | 2019-10-28 | 2019-12-20 | 深圳市银星智能科技股份有限公司 | Path planning method and device with obstacle avoidance weight and electronic equipment |
CN111012251A (en) * | 2019-12-17 | 2020-04-17 | 哈工大机器人(合肥)国际创新研究院 | Planning method and device for full-coverage path of cleaning robot |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107037806B (en) * | 2016-02-04 | 2020-11-27 | 科沃斯机器人股份有限公司 | Self-moving robot repositioning method and self-moving robot adopting same |
CN111708357B (en) * | 2019-09-17 | 2023-07-18 | 深圳银星智能集团股份有限公司 | Cleaning end condition identification method and device and sweeping robot |
CN112137529B (en) * | 2020-09-28 | 2021-08-24 | 珠海市一微半导体有限公司 | Cleaning control method based on dense obstacles |
-
2021
- 2021-02-20 CN CN202110192384.1A patent/CN113009911B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5006988A (en) * | 1989-04-28 | 1991-04-09 | University Of Michigan | Obstacle-avoiding navigation system |
CN106840168A (en) * | 2017-03-16 | 2017-06-13 | 苏州大学 | Complete coverage path planning method under clean robot and its dynamic environment |
CN107357295A (en) * | 2017-08-16 | 2017-11-17 | 珠海市微半导体有限公司 | A kind of method for searching path and chip and robot based on grating map |
CN107773164A (en) * | 2017-11-17 | 2018-03-09 | 北京奇虎科技有限公司 | Clean method, device and robot for clean robot |
CN110141164A (en) * | 2019-06-13 | 2019-08-20 | 深圳市银星智能科技股份有限公司 | A kind of area recognizing method, door region recognition system and clean robot |
CN110456789A (en) * | 2019-07-23 | 2019-11-15 | 中国矿业大学 | A kind of complete coverage path planning method of clean robot |
CN110595482A (en) * | 2019-10-28 | 2019-12-20 | 深圳市银星智能科技股份有限公司 | Path planning method and device with obstacle avoidance weight and electronic equipment |
CN111012251A (en) * | 2019-12-17 | 2020-04-17 | 哈工大机器人(合肥)国际创新研究院 | Planning method and device for full-coverage path of cleaning robot |
Also Published As
Publication number | Publication date |
---|---|
CN113009911A (en) | 2021-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110989631B (en) | Self-moving robot control method, device, self-moving robot and storage medium | |
CN113219992B (en) | Path planning method and cleaning robot | |
CN107913039B (en) | Block selection method and device for cleaning robot and robot | |
EP3974778B1 (en) | Method and apparatus for updating working map of mobile robot, and storage medium | |
CN113219993B (en) | Path planning method and cleaning robot | |
CN108209745B (en) | Control method and device of cleaning equipment, computer equipment and storage medium | |
CN104737085A (en) | Robot and method for autonomous inspection or processing of floor areas | |
CN112075879A (en) | Information processing method, device and storage medium | |
CN111061270B (en) | Full coverage method, system and operation robot | |
CN110146098A (en) | A kind of robot map enlargement method, device, control equipment and storage medium | |
CN112882459A (en) | Cleaning path planning method, cleaning path planning device and cleaning robot | |
CN114911228A (en) | Robot path planning method and device and robot | |
WO2024007807A1 (en) | Error correction method and apparatus, and mobile device | |
EP4177790A1 (en) | Map creation method and apparatus for self-moving device, and device and storage medium | |
CN114967698A (en) | Cleaning method, cleaning device, electronic apparatus, and storage medium | |
CN110764513A (en) | Map blind area identification method | |
CN113009911B (en) | Cleaning path generation method and device and self-moving equipment | |
CN113359705A (en) | Path planning method, formation cooperative operation method and equipment | |
CN110647148B (en) | Wall position determining method and device, computer equipment and storage medium | |
RU2658092C2 (en) | Method and navigation system of the mobile object using three-dimensional sensors | |
CN112034849B (en) | Area selection processing method for self-moving equipment and self-moving equipment | |
CN112732847A (en) | Navigation map generation method, electronic device and computer-readable storage medium | |
Maragliano et al. | Collaborative Active SLAM: Synchronous and Asynchronous Coordination Among Agents | |
WO2023103713A1 (en) | Method and system for searching for charging base, self-moving robot, and storage medium | |
CN114419288A (en) | Method and device for generating virtual laser data, storage medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230625 Address after: 100082 1905-2, 16th floor, building 1, yard 32, Xizhimen North Street, Haidian District, Beijing Patentee after: DALU ROBOTECH Patentee after: Shanghai land Zhiyuan Robot Technology Co.,Ltd. Address before: 100082 1905-2, 16th floor, building 1, yard 32, Xizhimen North Street, Haidian District, Beijing Patentee before: DALU ROBOTECH Patentee before: Suzhou continental Zhiyuan Robot Technology Co.,Ltd. |
|
TR01 | Transfer of patent right |