CN111857133A - Breadth-first search algorithm for sweeping robot to search non-sweeping area - Google Patents

Breadth-first search algorithm for sweeping robot to search non-sweeping area Download PDF

Info

Publication number
CN111857133A
CN111857133A CN202010590622.XA CN202010590622A CN111857133A CN 111857133 A CN111857133 A CN 111857133A CN 202010590622 A CN202010590622 A CN 202010590622A CN 111857133 A CN111857133 A CN 111857133A
Authority
CN
China
Prior art keywords
node
path
point
nodes
breadth
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.)
Pending
Application number
CN202010590622.XA
Other languages
Chinese (zh)
Inventor
詹伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Grand Pro Robot Technology Co ltd
Original Assignee
Hunan Grand Pro Robot Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hunan Grand Pro Robot Technology Co ltd filed Critical Hunan Grand Pro Robot Technology Co ltd
Priority to CN202010590622.XA priority Critical patent/CN111857133A/en
Publication of CN111857133A publication Critical patent/CN111857133A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0221Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving a learning process

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention discloses a breadth-first search algorithm for a sweeping robot to search an uncleaned area, which belongs to the field of automatic control and comprises the following steps: searching a global nearest non-cleaned point, searching a non-cleaned area, and outputting a path reaching the non-cleaned area; optimizing the path by using a method of deleting redundant nodes, and outputting a shortest path; and converting the shortest path into action table output according to the output shortest path, and controlling the sweeping robot to reach an uncleaned point for sweeping. The method aims to solve the problem that the sweeping robot can sweep the uncovered area in the sweeping process. The grid with the uncovered type is searched and swept from the known grid map by adopting a breadth-first search algorithm, an output search path is returned, the output path is simplified into the shortest path, the storage of redundant data is effectively avoided, the coverage efficiency of the sweeper is improved, the goal that the sweeper successfully searches an uncovered area is achieved, and the uncovered area can be accurately and quickly searched.

Description

Breadth-first search algorithm for sweeping robot to search non-sweeping area
Technical Field
The invention relates to the field of automatic control, in particular to a breadth-first search algorithm for a sweeping robot to search an uncleaned area.
Background
The method for searching the non-cleaned area applied to the sweeping robot at present has the following defects: (1) at present, a method for searching an uncleaned area by a sweeping robot based on inertial navigation is single, and the uncleaned area cannot be searched accurately. (2) Generally, a sweeping robot for searching an uncleaned area needs a camera or a radar, and is difficult to realize by relying on a sweeping robot based on inertial navigation. (3) The searched path is generally not the optimal path, and the cleaning efficiency is influenced. (4) The search is susceptible to obstacles, such as interference from people, pets, or other sweepers.
Therefore, a search algorithm is needed to be designed to quickly search the non-cleaning area of the robot, so that the coverage efficiency of the sweeper is improved, and the aim of successfully searching the non-cleaning area by the sweeper is fulfilled.
Disclosure of Invention
The invention aims to provide a breadth-first search algorithm for searching an uncovered area by a sweeping robot, and solves the technical problem of sweeping of the uncovered area by the existing sweeping robot. The method aims to solve the problem that the sweeping robot can sweep the uncovered area in the sweeping process. And searching and sweeping the grid with the type of uncovered from a known grid map by adopting a width-first search algorithm, returning an output search path, simplifying the output path into a shortest path, effectively avoiding the storage of redundant data, and simultaneously improving the coverage efficiency of the sweeper, thereby realizing the aim of successfully searching an uncovered area by the sweeper.
The algorithm is invoked when the area around the robot has been cleaned, or the robot has accidentally collided with an obstacle.
A breadth first search algorithm for a sweeping robot to find an unswept area, the method comprising the steps of:
step 1: searching a global nearest non-cleaned point when the area around the robot is cleaned or the robot accidentally collides with an obstacle;
step 2: the BFS algorithm is used for searching an uncleaned area based on a bidirectional linked list and outputting a path reaching the uncleaned area;
and step 3: optimizing the path by using a method of deleting redundant nodes, and outputting a shortest path;
and 4, step 4: and converting the shortest path into action table output according to the output shortest path, and controlling the sweeping robot to reach an uncleaned point for sweeping.
The specific process of the step 2 is as follows:
step 2.1: generating an initial node from the initial point coordinate, wherein the initial node is used as a first node in the two-way linked list;
step 2.2: generating child nodes by taking the first node as a father node, sequentially verifying the attribute of each node in the established map, exiting the cycle if the attribute of the map grid is an uncleaned child node, returning the node as an action output point, and entering the next step if the attribute of the map grid is an uncleaned child node;
Step 2.3: and sequentially generating corresponding new child nodes by the four child nodes of the head node, sequentially judging the attributes of the new nodes in the grid map, and circulating until the child nodes with the attributes of the map grid being not cleaned exit the circulation, and returning the nodes and all the parent nodes of the nodes as action output points, wherein the parent nodes do not comprise the head node.
In the step 2.2, the method for acquiring the child nodes is that,
step 2.2.1: verifying whether a grid where a father node is located has an obstacle or not, if so, exiting the cycle, and enabling child nodes of the father node to be empty;
step 2.2.2: a grid where a father node is located does not have a barrier, and child nodes are created from the father node in the four directions of the upper direction, the left direction, the lower direction and the right direction by taking the father node as a center;
step 2.2.3: setting the coordinates of the parent node 1 as (x, y), the coordinates of the four child nodes of the parent node 1 are (x, y)On the upper part,yOn the upper part),(xLeft side of,yLeft side of),(xLower part,yLower part) And (x)Right side,yRight side);
Step 2.2.4: and checking the reachability of each child node, and if the reachable child nodes exist and no repeated node exists after reverse query in the doubly linked list, establishing a node by taking the coordinates of the point and the parent node as parameters.
The coordinates of the four child nodes in step 2.2.3 are expressed as:
(xOn the upper part,yOn the upper part)=(x+d,y)
(xLeft side of,yLeft side of)=(x,y+d)
(xLower part,yLower part)=(x-d,y)
(xLower part,yLower part)=(x,y-d)。
The specific process of optimizing the path in the step 3 is as follows:
step 3.1: in the path output in step 2, if there is no obstacle in the path between a certain node and its non-adjacent nodes, its intermediate point is deleted in the final action path point set.
The specific process of deleting the intermediate point is as follows:
step 3.1.1: setting i to be 1, and j to be the point number +1 of the path output in the step 2, wherein i is the ith point of the path in the path, and j is the jth point of the path in the path;
step 3.1.2: then judging whether i is larger than or equal to j, if not, judging whether an obstacle exists between the ith point and the jth point, if so, j- -, if not, deleting the point between the ith point and the jth point, and entering step 3.1.4;
step 3.1.3: judging whether i +1 is greater than or equal to j, if not, returning to the step 3.1.1, and if so, entering the next step;
step 3.1.4: i + +, and j equals the number of points of the path +2, and returns to step 3.1.2.
The specific process of judging whether an obstacle exists between the ith point and the jth point in the step 3.1.2 is as follows: firstly solving the linear distance between two nodes, then dividing the region sections by taking the size of a single grid as the length, judging whether each region section is covered by an obstacle or not, and if so, indicating that the obstacle exists between the two nodes; if not, it indicates that there is no obstacle between two nodes.
By adopting the technical scheme, the invention has the following technical effects:
the invention has low cost and little dependence on the memory, can smoothly run with other robot algorithms in STM32F1 series chips with lower STM chip cost, can quickly and accurately search an uncleaned area, is the nearest uncleaned area, and has the optimal and shortest searched output path, thereby greatly improving the cleaning efficiency. The grid with the uncovered type is searched and swept from the known grid map by adopting a breadth-first search algorithm, an output search path is returned, the output path is simplified into the shortest path, the storage of redundant data is effectively avoided, and meanwhile, the coverage efficiency of the sweeper is improved, so that the aim of successfully searching the uncovered area by the sweeper is fulfilled, and the uncovered area can be accurately and rapidly searched.
Drawings
FIG. 1 is a diagram illustrating the generation of child nodes from parent nodes in accordance with the present invention.
FIG. 2 is a schematic diagram of a motion path before optimization according to the present invention.
FIG. 3 is a diagram illustrating an optimized action path according to the present invention.
Fig. 4 is a flow chart of redundant node deletion according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, preferred embodiments are given and the present invention is described in further detail. It should be noted, however, that the numerous details set forth in the description are merely for the purpose of providing the reader with a thorough understanding of one or more aspects of the present invention, which may be practiced without these specific details.
A breadth-first search algorithm for searching an uncleaned area by a sweeping robot can be applied to a middle-grade sweeping robot based on inertial navigation. As shown in fig. 1, the specific steps are as follows:
1. when the area around the robot is cleaned or the robot accidentally collides with an obstacle, the algorithm is called to search a global nearest non-cleaned point, a grid map passing through is obtained according to a linked list, and the grid map is converted into an action table to be output.
2. Strategy for searching for an uncleaned area:
the BFS algorithm adopted at this time is realized based on a bidirectional linked list, and the specific algorithm steps are as follows:
generating an initial node by the initial point coordinate, wherein the initial node is used as a first node in a two-way linked list, and the C code is implemented as follows:
Figure RE-GDA0002682675410000051
Secondly, generating child nodes (four adjacent nodes in the sequence of upper, right, lower and left) by taking the first node as a father node, successively verifying the attribute of each node in the established map in the sequence, and if the attribute of each node in the map grid is an uncleaned child node, exiting the loop and returning the node as an action output point.
If the step (c) is not satisfied, then entering next judgment, sequentially generating corresponding new child nodes by the four child nodes of the first node, sequentially judging the attributes of the new nodes on the grid map, and circulating the steps until the attributes of the grid map exist and the child nodes which are not cleaned exit the circulation, and returning the node and all father nodes (not including the first node) of the node as action output points.
The method for acquiring the child node comprises the following steps:
(1) and verifying whether the grid where the parent node is located has an obstacle, if so, exiting the loop, and enabling the child node of the parent node to be empty.
(2) The grid where the father node is located has no obstacle, and child nodes are created in four directions, namely upward, left, downward and right, by taking the father node as a center, as shown in fig. 1.
Assuming that the coordinates of the parent node 1 are (x, y), the four child nodes 2(x up, y up), 3(x left, y left), 4(x down, y down), right (x right, y right) of the parent node 1 are represented as follows:
(xOn the upper part,yOn the upper part)=(x+d,y)
(xLeft side of,yLeft side of)=(x,y+d)
(xLower part,yLower part)=(x-d,y)
(xLower part,yLower part)=(x,y-d)。
(3) And checking the reachability of each child node, and if the reachable child nodes exist and no repeated node exists after reverse query in the doubly linked list, establishing a node by taking the coordinates of the point and the parent node as parameters.
3. And (3) an output path optimization strategy:
the path output by the above algorithm is obviously not the simplest route, as shown in FIG. 2, where node 0 is the starting point and the target point is node 12, then the set of action output points generated by the BFS algorithm are nodes 1-2-3-4-5-6-7-8-9-10-11-12. The path is now optimized, if there is no obstacle in the path between a node and its non-adjacent following node, its intermediate point is deleted in the final set of action path points, so the final optimized action path is shown in fig. 3, and its flow of deleting redundant nodes is shown in fig. 4, where the set of optimized path points is nodes 0-3-6-10-12.
4. A strategy for determining whether there is an obstacle between two nodes:
firstly solving the linear distance between two nodes, then dividing the region sections by taking the size of a single grid as the length, judging whether each region section is covered by an obstacle or not, and if so, indicating that the obstacle exists between the two nodes; if not, it indicates that there is no obstacle between two nodes. The code C is implemented as follows:
Figure RE-GDA0002682675410000071
Figure RE-GDA0002682675410000081
Figure RE-GDA0002682675410000091
And realizing the covering process of the sweeping robot on the non-sweeping area by adopting a breadth-first search algorithm. The output path of the search algorithm is the optimal and shortest path, and the uncleaned area can be quickly and accurately found. And judging whether the two nodes have obstacles or not in the output path of the search algorithm by adopting approximate region division.
The method aims to solve the problem that the sweeping robot can sweep the uncovered area in the sweeping process. And searching and sweeping the grid with the type of uncovered from a known grid map by adopting a width-first search algorithm, returning an output search path, simplifying the output path into a shortest path, effectively avoiding the storage of redundant data, and simultaneously improving the coverage efficiency of the sweeper, thereby realizing the aim of successfully searching an uncovered area by the sweeper.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be construed as the protection scope of the present invention.

Claims (7)

1. A breadth-first search algorithm for a sweeping robot to find an unswept area, the method comprising the steps of:
Step 1: searching a global nearest non-cleaned point when the area around the robot is cleaned or the robot accidentally collides with an obstacle;
step 2: the BFS algorithm is used for searching an uncleaned area based on a bidirectional linked list and outputting a path reaching the uncleaned area;
and step 3: optimizing the path by using a method of deleting redundant nodes, and outputting a shortest path;
and 4, step 4: and converting the shortest path into action table output according to the output shortest path, and controlling the sweeping robot to reach an uncleaned point for sweeping.
2. The breadth-first search algorithm for a sweeping robot to find an uncleaned area according to claim 1, wherein: the specific process of the step 2 is as follows:
step 2.1: generating an initial node from the initial point coordinate, wherein the initial node is used as a first node in the two-way linked list;
step 2.2: generating child nodes by taking the first node as a father node, sequentially verifying the attribute of each node in the established map, exiting the cycle if the attribute of the map grid is an uncleaned child node, returning the node as an action output point, and entering the next step if the attribute of the map grid is an uncleaned child node;
Step 2.3: and sequentially generating corresponding new child nodes by the four child nodes of the head node, sequentially judging the attributes of the new nodes in the grid map, and circulating until the child nodes with the attributes of the map grid being not cleaned exit the circulation, and returning the nodes and all the parent nodes of the nodes as action output points, wherein the parent nodes do not comprise the head node.
3. The breadth-first search algorithm for a sweeping robot to find an uncleaned area according to claim 2, wherein: in the step 2.2, the method for acquiring the child nodes is that,
step 2.2.1: verifying whether a grid where a father node is located has an obstacle or not, if so, exiting the cycle, and enabling child nodes of the father node to be empty;
step 2.2.2: a grid where a father node is located does not have a barrier, and child nodes are created from the father node in the four directions of the upper direction, the left direction, the lower direction and the right direction by taking the father node as a center;
step 2.2.3: setting the coordinates of the parent node 1 as (x, y), the coordinates of the four child nodes of the parent node 1 are (x, y)On the upper part,yOn the upper part),(xLeft side of,yLeft side of),(xLower part,yLower part) And (x)Right side,yRight side);
Step 2.2.4: and checking the reachability of each child node, and if the reachable child nodes exist and no repeated node exists after reverse query in the doubly linked list, establishing a node by taking the coordinates of the point and the parent node as parameters.
4. The breadth-first search algorithm for a sweeping robot to find an uncleaned area according to claim 3, wherein: the coordinates of the four child nodes in step 2.2.3 are expressed as:
(xon the upper part,yOn the upper part)=(x+d,y)
(xLeft side of,yLeft side of)=(x,y+d)
(xLower part,yLower part)=(x-d,y)
(xLower part,yLower part)=(x,y-d)。
5. The breadth-first search algorithm for a sweeping robot to find an uncleaned area according to claim 1, wherein: the specific process of optimizing the path in the step 3 is as follows:
step 3.1: in the path output in step 2, if there is no obstacle in the path between a certain node and its non-adjacent nodes, its intermediate point is deleted in the final action path point set.
6. The breadth-first search algorithm for a sweeping robot to find an uncleaned area according to claim 5, wherein: the specific process of deleting the intermediate point is as follows:
step 3.1.1: setting i to be 1, and j to be the point number +1 of the path output in the step 2, wherein i is the ith point of the path in the path, and j is the jth point of the path in the path;
step 3.1.2: then judging whether i is larger than or equal to j, if not, judging whether an obstacle exists between the ith point and the jth point, if so, j- -, if not, deleting the point between the ith point and the jth point, and entering step 3.1.4;
Step 3.1.3: judging whether i +1 is greater than or equal to j, if not, returning to the step 3.1.1, and if so, entering the next step;
step 3.1.4: i + +, and j equals the number of points of the path +2, and returns to step 3.1.2.
7. The breadth-first search algorithm for a sweeping robot to find an uncleaned area according to claim 6, wherein: the specific process of judging whether an obstacle exists between the ith point and the jth point in the step 3.1.2 is as follows: firstly solving the linear distance between two nodes, then dividing the region sections by taking the size of a single grid as the length, judging whether each region section is covered by an obstacle or not, and if so, indicating that the obstacle exists between the two nodes; if not, it indicates that there is no obstacle between two nodes.
CN202010590622.XA 2020-06-24 2020-06-24 Breadth-first search algorithm for sweeping robot to search non-sweeping area Pending CN111857133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010590622.XA CN111857133A (en) 2020-06-24 2020-06-24 Breadth-first search algorithm for sweeping robot to search non-sweeping area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010590622.XA CN111857133A (en) 2020-06-24 2020-06-24 Breadth-first search algorithm for sweeping robot to search non-sweeping area

Publications (1)

Publication Number Publication Date
CN111857133A true CN111857133A (en) 2020-10-30

Family

ID=72988199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010590622.XA Pending CN111857133A (en) 2020-06-24 2020-06-24 Breadth-first search algorithm for sweeping robot to search non-sweeping area

Country Status (1)

Country Link
CN (1) CN111857133A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113607181A (en) * 2021-08-05 2021-11-05 国网上海市电力公司 Optimization method of jumping point search algorithm
CN114343490A (en) * 2021-12-28 2022-04-15 深圳市银星智能科技股份有限公司 Robot cleaning method, robot, and storage medium
CN114371692A (en) * 2021-11-26 2022-04-19 中国人民解放军军事科学院国防科技创新研究院 Patrol ship area coverage path planning method, system and device under energy constraint

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183445A (en) * 2007-12-20 2008-05-21 浙江大学 Personnel evacuation method for municipal traffic under calamity outburst surroundings
CN107773164A (en) * 2017-11-17 2018-03-09 北京奇虎科技有限公司 Clean method, device and robot for clean robot
CN108196536A (en) * 2017-12-21 2018-06-22 同济大学 A kind of improved unmanned vehicle rapidly-exploring random tree paths planning method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183445A (en) * 2007-12-20 2008-05-21 浙江大学 Personnel evacuation method for municipal traffic under calamity outburst surroundings
CN107773164A (en) * 2017-11-17 2018-03-09 北京奇虎科技有限公司 Clean method, device and robot for clean robot
CN108196536A (en) * 2017-12-21 2018-06-22 同济大学 A kind of improved unmanned vehicle rapidly-exploring random tree paths planning method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马云飞: "移动机器人全覆盖路径规划与自主导航算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113607181A (en) * 2021-08-05 2021-11-05 国网上海市电力公司 Optimization method of jumping point search algorithm
CN114371692A (en) * 2021-11-26 2022-04-19 中国人民解放军军事科学院国防科技创新研究院 Patrol ship area coverage path planning method, system and device under energy constraint
CN114371692B (en) * 2021-11-26 2023-10-13 中国人民解放军军事科学院国防科技创新研究院 Patrol ship area coverage path planning method, system and device under energy constraint
CN114343490A (en) * 2021-12-28 2022-04-15 深圳市银星智能科技股份有限公司 Robot cleaning method, robot, and storage medium
CN114343490B (en) * 2021-12-28 2023-01-17 深圳银星智能集团股份有限公司 Robot cleaning method, robot, and storage medium

Similar Documents

Publication Publication Date Title
CN111857133A (en) Breadth-first search algorithm for sweeping robot to search non-sweeping area
CN108549385B (en) Robot dynamic path planning method combining A-x algorithm and VFH obstacle avoidance algorithm
CN110361017B (en) Grid method based full-traversal path planning method for sweeping robot
CN110338715B (en) Method and chip for cleaning floor by intelligent robot and cleaning robot
CN110456789A (en) A kind of complete coverage path planning method of clean robot
CN112799398B (en) Cleaning path planning method based on path finding cost, chip and cleaning robot
CN111811514A (en) Path planning method based on regular hexagon grid jumping point search algorithm
CN112393728A (en) Mobile robot path planning method based on A-algorithm and RRT-algorithm
CN111643008B (en) Expanded partition cleaning method and device and computer readable storage medium
Yakovlev et al. Grid-based angle-constrained path planning
CN112068557A (en) Mobile robot full-coverage path planning method, chip and robot
Shivashankar et al. Real-time planning for covering an initially-unknown spatial environment
CN114199270A (en) Robot path planning method integrating bidirectional search mechanism and improved A-algorithm
CN108803586A (en) A kind of working method of sweeping robot
CN110275528A (en) For the method for optimizing route of RRT algorithm improvement
CN113009916A (en) Path planning method, chip and robot based on global map exploration
CN115047880A (en) Intelligent path planning method for robot in unknown dynamic environment
CN114442618A (en) ACO-PSO-VFH-based autonomous dynamic path planning method for indoor mobile robot
CN113848911A (en) Mobile robot global path planning method based on Q-learning and RRT
CN111493756A (en) Supplementary sweeping method of sweeper, storage medium and sweeper
CN116558527A (en) Route planning method for underground substation inspection cleaning robot
CN116839609A (en) Full coverage path planning method, device and computer readable storage medium
CN116430843A (en) Method and system for realizing photovoltaic module cleaning robot based on visual SLAM
CN111722624A (en) Cleaning method, device, equipment and computer readable storage medium
CN115741686A (en) Robot path planning method based on variable probability constraint sampling

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201030

RJ01 Rejection of invention patent application after publication