Target point search method, chip and robot based on boundary line
Through the target point search method based on boundary line, the robot extracts the full contour line and preset boundary line, filters the reachable boundary points, solving the problems of low navigation efficiency and frequent collisions in the existing technology, and achieving a more stable and efficient path Planning and access.
Patent Information
- Application Number
- CN202210787428.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-07-06
AI Technical Summary
When navigating, existing indoor mobile robots frequently approach or enter obstacle areas, resulting in too many path nodes, slow and inefficient, and prone to collision with obstacles.
Using the target point search method based on boundary lines, the full contour line and the preset boundary line are extracted through image morphology method, the full contour line is traversed according to the preset hour hand direction, the reachable boundary point is detected and filtered, and the target point that meets the pass conditions is determined. , to optimize path planning and avoid obstacles.
A more continuous and smooth contour lines and boundary lines are achieved, which improves the stability of target point selection and safe passage of robots between obstacles, reduces the frequency of collision with obstacles, and improves navigation efficiency and real-time.
Smart Images

Figure CN115167421B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path node searching, and in particular to a target point searching method based on a boundary line, a chip and a robot. Background Art
[0002] At present, the basis for indoor mobile robots to be called intelligent is that they can complete navigation and positioning functions when they have a map. Generally, the robot obtains the map by randomly expanding path nodes. However, in the process of using data structures representing various road environment information to participate in the search, in order to simulate the real terrain contours in the map, the robot will frequently get close to obstacles, and even extend into the area occupied by obstacles, causing the robot to search too many path nodes too slowly, resulting in a decrease in the efficiency of the robot's navigation work, and poor passage in local areas, which also causes the robot to collide with obstacles multiple times. Summary of the invention
[0003] In order to overcome the above technical defects, the present invention discloses a target point search method based on boundary lines, a chip and a robot. The specific technical solution is as follows:
[0004] A target point search method based on a boundary line, the target point search method comprising: step A, the robot extracts a full contour line and preset boundary points from a map; step B, the robot traverses points in the full contour line in a preset clockwise direction, and detects whether there are preset boundary points in the neighborhood of the points in the full contour line; step C, according to the passability of the boundary line where the preset boundary point detected in step B is located, determining a reachable boundary point; step D, within a preset coverage area corresponding to the reachable boundary point, the robot sets a point that meets the preset pass conditions as a target point.
[0005] Furthermore, in step A, the robot uses an image morphological method to extract a full contour line and a preset boundary line from a map, wherein the preset boundary point is a point in the preset boundary line, so that whenever the robot extracts the preset boundary line, it obtains the position information of the point in the preset boundary line and the environmental information marked at the point; wherein the preset boundary line is the boundary line between a free area and an unknown area; the unknown area is composed of pixel points marked as unknown positions, and the free area is composed of pixel points marked as passable positions, so that one side of the preset boundary line is distributed with the pixel points marked as unknown positions, and the other side of the preset boundary line is distributed with the pixel points marked as passable positions; wherein the boundary line where the preset boundary point detected in step B is located is the preset boundary line where the preset boundary point is located.
[0006] Furthermore, the method in which the robot uses an image morphological method to extract a full contour line and a preset boundary line from a map includes: the robot uses an image morphological method to extract a full contour line from a map; the robot uses an image morphological method to extract an obstacle contour line from the same map; the robot controls the subtraction of the full contour line and the obstacle contour line to obtain the preset boundary line, and determines to extract the preset boundary line.
[0007] Further, the method for the robot to extract the full contour line and the preset boundary line from the map using the image morphology method includes: the robot grayscales the map according to a first preset grayscale threshold to obtain a first map image; then controls the first map image to be corroded and then expanded to obtain a first second map image, and then the robot extracts the full contour map from the first second map image; wherein the full contour map is a collection of full contour lines; the full contour line includes an obstacle contour line and / or an edge route extending around the obstacle contour line; the distance between the edge route and the obstacle contour line is within a preset anti-collision distance range; the robot grayscales the map according to a second preset grayscale threshold to obtain a second first map image; then controls the second first map image to be corroded and then expanded to obtain a second second map image; then the robot extracts the obstacle contour map from the second second map image; wherein the obstacle contour map is a collection of obstacle contour lines; the robot controls the full contour map to be subtracted from the obstacle contour map to obtain the preset boundary line, so that the robot removes the obstacle contour line from the full contour line; wherein the first preset grayscale threshold is less than the second preset grayscale threshold.
[0008] Furthermore, between step A and step B, it also includes: the robot uses the full contour line to search for the target obstacle, and then sets the midpoint of the full contour line corresponding to the target obstacle as a simulated edge starting point; then in step B, the robot starts from the simulated edge starting point and traverses the points in the corresponding full contour line in a preset clockwise direction, wherein the robot's posture does not change during the process of traversing the full contour line; the full contour line includes an edge route extending around the obstacle contour line, and / or an obstacle contour line, so that a full contour line corresponds to an obstacle; wherein the distance between the edge route and the obstacle contour line is within a preset anti-collision range.
[0009] Furthermore, the method for the robot to search for the target obstacle using the full contour line includes: the robot searches for the full contour line closest to the current position point of the robot, and marks the full contour line as the first full contour line; then sets the obstacle corresponding to the first full contour line with the largest trajectory length as the target obstacle, wherein the full contour line corresponding to the target obstacle is the first full contour line with the largest trajectory length; or, the robot searches for the full contour line with the largest trajectory length, and marks the full contour line segment as the first full contour line; then sets the obstacle corresponding to the first full contour line closest to the current position point of the robot as the target obstacle, wherein the full contour line corresponding to the target obstacle is the first full contour line closest to the current position point of the robot.
[0010] Furthermore, in step B, the robot traverses the points in the full contour line in a preset clockwise direction, and the method for detecting whether there are preset boundary points in the neighborhood of the points in the full contour line includes: in the process of the robot traversing the full contour line extracted in step A in a preset clockwise direction starting from the simulated edge starting point, each time the robot traverses to a point in the full contour line, the traversed point is marked as a visited point, and then it is detected whether there is the preset boundary point in the neighborhood of the visited point, and if so, the preset boundary points are stored in a linear storage space in a sorting direction in the reverse direction of the preset clockwise direction, so that in the process of the robot walking in the preset clockwise direction, the order of reading the preset boundary points from the linear storage space represents the order of the obstacle contour line actually followed by the robot; wherein, the preset boundary points include the pixel points marked as passable positions.
[0011] Furthermore, in the step C, according to the passability of the boundary line where the preset boundary point detected in step B is located, the method for determining the reachable boundary point includes: the robot first erodes the obstacle point in the full contour line according to the template image so that the area occupied by the obstacle where the obstacle point is located is expanded, wherein the obstacle point is a pixel point marked as an obstacle occupied position, and the expansion radius of the template image is equal to the body radius of the robot; the full contour line includes an edge route extending around the obstacle contour line, and / or an obstacle contour line; the points in the obstacle contour line include the obstacle point; then, the robot executes a filling algorithm starting from the origin of the map coordinate system, at In the process of expanding from the origin of the map coordinate system toward the quadrant area of the map coordinate system, it is determined whether there is a candidate boundary point in the neighborhood of the currently expanded connected point, and if so, the candidate boundary point is set as a reachable boundary point; wherein the connected points expanded by the robot using the filling algorithm are all pixel points of traversable positions, and the expanded connected points are connected to the origin of the map coordinate system; wherein the robot marks the preset boundary line where each preset boundary point detected in step B is located as the boundary line to be measured; when it is detected that the straight-line distance between two points in the boundary line to be measured is greater than the body diameter of the robot, the robot sets the point in the boundary line to be measured as a candidate boundary point.
[0012] Further, in step D, the method in which the robot sets a point that meets the preset pass condition as a target point within the preset coverage area corresponding to the reachable boundary point includes: the robot respectively takes each point within the preset coverage area corresponding to the reachable boundary point as the center point and delineates the corresponding preset coverage area; for each delineated preset coverage area, the robot obtains the number of points of various environmental information types within the preset coverage area, and then obtains the passable score of the center point of the preset coverage area by applying a corresponding weight coefficient to the number of points of each environmental information type, so as to form the passable score of a point within the preset coverage area corresponding to the reachable boundary point; in the machine After the robot obtains the passable score of each point in the preset coverage area corresponding to the reachable boundary point, the robot sets the point with the largest passable score as the target point, so that the robot walking to the target point does not collide with obstacles and determines that the preset pass conditions are met; wherein the preset coverage area corresponding to each point is a circular area with the point as the center point and a coverage radius of one fuselage radius; the distance between any point in the preset coverage area corresponding to each point and the center point is less than or equal to the fuselage radius; the environmental information marked by the points in the preset coverage area corresponding to each point includes passable positions, and / or unknown positions, and / or obstacle-occupied positions.
[0013] Furthermore, in the process of the robot obtaining the number of points of various types of environmental information in a preset coverage area, the robot counts the number of pixel points marked as passable positions and records the counted number as the first number of pixel points, the robot also counts the number of pixel points marked as unknown positions and records the counted number as the second number of pixel points, and the robot also counts the number of pixel points marked as obstacle-occupied positions and records the counted number as the third number of pixel points; the robot assigns a first pass weight coefficient to the pixel points marked as passable positions, and the robot assigns a second pass weight coefficient to the pixel points marked as unknown positions, and the robot assigns a third pass weight coefficient to the pixel points marked as obstacle-occupied positions. Coefficient, wherein the first traffic weight coefficient is greater than the second traffic weight coefficient, and the second traffic weight coefficient is greater than the third traffic weight coefficient; then the robot marks the product of the first traffic weight coefficient and the first number of pixels as the weighted result of the passable position, and at the same time the robot marks the product of the second traffic weight coefficient and the second number of pixels as the weighted result of the unknown position, and at the same time the robot marks the product of the third traffic weight coefficient and the third number of pixels as the weighted result of the position occupied by the obstacle; then the robot adds the weighted results of the passable position, the weighted results of the unknown position and the weighted results of the position occupied by the obstacle, and then sets the added result as the passable score of the center point of the preset coverage area.
[0014] A chip is used to store program codes, and the program codes are used to execute the target point search method based on boundary lines.
[0015] A robot having the chip built therein.
[0016] The technical effect of the present invention is that: according to the passability and preset pass conditions, the extracted preset boundary points and the boundary lines where the preset boundary points are located are screened to make the extracted contour lines and boundary lines more continuous and smooth, thereby ensuring the stability of the target point selection, and through the robot's passability verification, the robot's target point evaluation and search in a given direction and the planning of accessible paths are realized, thereby ensuring that the robot passes safely in the passable area between obstacles or between obstacles and boundary lines, and also having good real-time performance, so that the robot can walk to the target point without collision, and also prevent the robot from being trapped by obstacles, avoiding frequent collisions with obstacles. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a target point search method based on boundary lines disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. The present invention is provided with accompanying drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant description of the specification to explain the operating principle of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. Processing or method depicted as a flow chart. Although the flow chart describes each step as a sequential process, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of each step can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc. It should be noted that when a search algorithm is used to solve a problem, it is necessary to construct a data structure that shows the state characteristics and the relationship between different states. This data structure is called a node. Different problems need to be described using different data structures. Based on the conditions given by the search problem, one or more new nodes can be generated from a node. This process is usually called expansion.
[0019] As an embodiment, a target point search method based on a boundary line is disclosed. The execution subject of the target point search method is a robot. The execution subject of the target point search method can be understood as a controller set inside the robot that can run program codes; Figure 1 As shown, the target point search method includes the following steps:
[0020] Step A, the robot extracts the full contour line and the preset boundary points from the map. At this time, although the robot extracts and can record the position information of each full contour line and the environmental information of the area it passes through, and the position information of each preset boundary point and the environmental information of the area where it is located, the robot does not calculate or record the relative position relationship between two preset boundary points, the relative position relationship between two full contour lines, the relative position relationship between the preset boundary point and the full contour line, or the relative position relationship between the preset boundary point and the point in the full contour line in step A; then execute step B; wherein the map is a grid map constructed by the robot in advance by scanning in its working area, and each grid in the grid map is mapped to the map image. Corresponding to a pixel point, each pixel point is marked with position information (coordinate information) and environmental information (whether there are obstacles). In this embodiment, the terrain contour in the map area is the contour of the working area described in the map, so that the robot can walk directly along the corresponding contour, or obtain passable points and routes after selecting and sorting the described contour segments. The full contour line is extracted from the map and is regarded as a line segment parallel to the obstacle contour line, or an obstacle contour line. The preset boundary point is a point on the boundary line of two different types of environmental areas, which can be regarded as the boundary line of one of the two adjacent different types of environmental areas. Further, the boundary line can be a common boundary line segment of two different types of environmental areas.
[0021] Step B, the robot traverses the points in the full contour line in a preset clockwise direction, and detects whether there are preset boundary points in the neighborhood of the points in the full contour line, and then executes step C; wherein the preset clockwise direction is a clockwise direction or a counterclockwise direction; in this step B, the robot traverses each contour point in the full contour line in the map in turn along the full contour line in the preset clockwise direction, but the robot's posture does not change, which is equivalent to simulating the robot walking along the full contour line in the actual environment in the preset clockwise direction and detecting whether there are preset boundary points near each contour point (at least in the front, back, left, and right directions). First, mark the preset boundary points (extracted in step A) to determine the traversal order of the full contour line along which the robot needs to walk when it actually walks and the traversal order of the preset boundary points, and then roughly determine the relative position relationship between the two full contour lines that need to be walked (or explored during simulated walking), the relative position relationship between the preset boundary points and the full contour line that need to be walked (or explored during simulated walking), or the relative position relationship between the preset boundary points and the points in the full contour line that need to be walked (or explored during simulated walking), which is conducive to the subsequent planning of the navigation path.
[0022] Step C, determine the reachable boundary points according to the passability of the boundary line where the preset boundary points detected in step B are located, and then execute step D; wherein, the passability of the boundary line where the preset boundary points detected in step B are located includes the robot walking to the preset boundary points and the robot walking along the boundary line where the preset boundary points are located, at least reflecting the effect that the boundary line where the preset boundary points detected in step B are located can accommodate the complete body of the robot walking on its boundary line or walking on a trajectory line parallel to the boundary line, and in some embodiments, it is manifested as the passability of the robot walking along the obstacle contour line; then, the reachable boundary points determined in step C must be derived from the boundary line where the preset boundary points detected in step B are located, and the number of the reachable boundary points can be one or more, but not necessarily the preset boundary points detected in step B, so that all the acquired preset boundary points are screened according to the passability of the robot walking along the aforementioned boundary line.
[0023] Step D: In the preset coverage area corresponding to the reachable boundary point, the robot sets the point that meets the preset passage conditions as the target point. When the robot walks over the target point, it is not easy to get close to the obstacle contour line, which reduces the number of collisions between the robot and the obstacle and improves the safety of the robot's walking. Specifically, the point that meets the preset passage conditions is screened out from the preset coverage area corresponding to the reachable boundary point, which can also be regarded as a determination of the passability of the boundary line where the preset boundary point is located and an evaluation and selection are performed on this basis, so that the point that meets the preset passage conditions is the position point where the cost of the robot colliding with the obstacle is the lowest and the cost of free passage is the highest, and then the target point set in step D can be visited in sequence from the current position of the robot according to the detection order of the preset boundary points, or the preset clockwise direction, or other related access order.
[0024] In summary, this embodiment screens the extracted preset boundary points and the boundary lines where the preset boundary points are located according to the passability and preset passage conditions to make the extracted contour lines and boundary lines more continuous and smooth, thereby ensuring the stability of the target point selection, and through the robot's passability verification, the robot's target point evaluation and search in a given direction and the planning of accessible paths are realized, thereby ensuring that the robot passes safely in the passable area between obstacles or between obstacles and boundary lines. It also has good real-time performance, allowing the robot to walk to the target point without collision, preventing the robot from being trapped by obstacles, and avoiding frequent collisions with obstacles. The target point search method disclosed in this embodiment also supports general obstacle contours and non-entity boundary lines, thereby improving the availability of application layer programs.
[0025] As an embodiment, in step A, the robot uses an image morphology method to extract a full contour line and a preset boundary line from a map, wherein the preset boundary point is a point in the preset boundary line, so that whenever the robot extracts the preset boundary line, it obtains the position information of the point in the preset boundary line in the map and the environmental information marked at the point; in this embodiment, the position information of the point in the preset boundary line in the map includes the coordinate information of the point in the preset boundary line and the forward direction information of the robot at the point in the preset boundary line; the environmental information marked at the point in the preset boundary line includes an unknown position, a passable position, and an obstacle occupied position. It should be noted that it can be understood by those skilled in the art that the grid map is marked with environmental information around the current position of the robot, and the grids in the grid map area constructed by the robot include three states marked as free, occupied, and unknown; these grids can be represented by grid points in this embodiment, that is, the center point of the grid, and each grid point corresponds to a pixel point. A grid in a free state refers to a grid that is not occupied by obstacles, representing a grid position point that the robot can pass through, and is marked as a free grid in the grid map; a grid in a free state can also be represented by a pixel point that is not occupied by an obstacle, and the pixel point is located at the center point of the cell used to divide the map, and is marked as a passable position in the map image corresponding to the grid map; multiple free grids form an unoccupied area, allowing the robot to pass freely in the unoccupied area. A grid in an occupied state refers to a grid occupied by an obstacle, and is marked as an obstacle grid in the grid map. Multiple obstacle grids can form an occupied area; an occupied state can also be represented by a pixel point occupied by an obstacle, and is marked as an obstacle occupied position in the map image corresponding to the grid map; a grid in an unknown state refers to a grid whose specific situation is unclear marked by the robot in the grid map, and its actual location is often blocked by obstacles, and can form an unknown area. The grid of unknown state can also be represented by the pixel points whose specific situation is unclear marked by the robot, and marked as unknown positions in the map image corresponding to the grid map; multiple grids of unknown state constitute an unoccupied area, allowing the robot to pass freely in the unoccupied area.On this basis, the preset boundary line is the boundary line between the free area and the unknown area, so as to divide at least one free area and at least one unknown area; the unknown area is composed of pixels marked as unknown positions, and the free area is composed of pixels marked as passable positions, so that the pixels marked as unknown positions are distributed on one side of the preset boundary line, and the pixels marked as passable positions are distributed on the other side of the preset boundary line. It should be noted that the pixels constituting the preset boundary line are distinguished by grayscale values from the pixels in the free area distributed on one side of the preset boundary line and the pixels in the unknown area distributed on the other side of the preset boundary line. Then the pixels in the preset boundary line include pixels marked as obstacle occupied positions, pixels marked as unknown positions, or pixels marked as passable positions, or the pixels in the preset boundary line are pixels marked as unknown positions, or pixels marked as passable positions; but the grayscale values of the pixels in the preset boundary line are different from the grayscale values of the pixels in the free area and the unknown area separated by the preset boundary line. This prevents the problem of frequent switching of the preset boundary line due to fluctuations caused by the obstacle contour points being in a critical state when selecting the preset boundary line. It is also possible to continuously explore the unknown area on one side of the preset boundary line using the environmental information and position information marked by the pixel points in the preset boundary line.
[0026] Preferably, the pixel points on the boundary line between the unknown area and the free area (which may be the boundary line on both sides of the adjacent boundary area) constitute the preset boundary line. In some embodiments, the boundary line segment between each free area in the map and its nearest unknown area is obtained by the robot in step A and is marked as the preset boundary line, so that the preset boundary line can be understood as neither a boundary line belonging to the unknown area nor a boundary line belonging to the free area, the number of grids (corresponding pixel points) filled in the unknown area is greater than or equal to 3, and the number of grids (corresponding pixel points) filled in the free area is greater than or equal to 3.
[0027] It is worth noting that the robot remains at the same position or maintains the same posture during the execution of step A, step B, step C and step D. After the map is grayed, the grayscale values of the pixels in the preset boundary line are different from the grayscale values of the pixels constituting the unknown area, and the grayscale values of the pixels in the preset boundary line are different from the grayscale values of the pixels constituting the free area, wherein the boundary line where the preset boundary point detected in step B is located is the preset boundary line where the preset boundary point is located.
[0028] As an embodiment, the method for the robot to extract the full contour line and the preset boundary line from the map using the image morphology method includes: the robot extracts the full contour line from the map using the image morphology method, and correspondingly, a plurality of full contour lines can form a frame of contour map, and the full contour line includes the obstacle contour line, and / or the edge route extending around the obstacle contour line, so as to determine the type of the full contour line to include the route that the robot can pass, and the line connecting the obstacle points that hinder the robot from passing. Specifically, the robot grayscales the map according to the first preset grayscale threshold to obtain a first map image, that is, to obtain a binary image, in which the grayscale value of the pixel point in the map is greater than the first preset grayscale threshold, and its grayscale value is configured as 255, and the color of the pixel point is filled with black; the grayscale value of the pixel point is less than or equal to the first preset grayscale threshold, and its grayscale value is configured as 0, and the color of the pixel point is filled with white. Then the first map image is controlled to be eroded first and then expanded to obtain the first and second map images. Compared with the first map image, the first and second map images eliminate the small areas with higher brightness in the first map image, separate objects at fine points, and for larger objects, their boundaries can be smoothed without significantly changing their areas, that is, firstly the smaller white dots are removed by the erosion operation (denoising), and then the original large white dots are restored by the expansion operation, so that the small black dots are removed (further denoising). Then the robot extracts the full contour map from the first and second map images, wherein the full contour map is a collection of full contour lines; preferably, the robot extracts the sideline route parallel to the obstacle contour line (an implementation method of the sideline route extending around the obstacle contour line) and the obstacle contour line from the first and second map images, wherein the distance between the sideline route and the obstacle contour line is within the preset anti-collision distance range, which is used to represent the motion trajectory line of the robot actually walking along the obstacle. Preferably, the preset anti-collision distance range is set to be greater than or equal to the body diameter of the robot, thereby setting the collision safety range. Therefore, the full contour line is used to represent the terrain contour features of the working area where the robot is located in the first and second map images. There are line segments passing through obstacle contour points and line segments not passing through obstacles in the full contour line, all of which belong to the terrain contour line. Among them, the obstacle contour point is the pixel point where the obstacle contour line passes.
[0029] The robot uses an image morphological method to extract an obstacle contour line from the same map, wherein the obstacle contour line is a contour point passing through the obstacle, and the obstacle contour line is equivalent to a line connecting the contour points of the obstacle, that is, a line connecting the pixel points marked as the contour points of the obstacle; for the same map (the initial map image that has not undergone the aforementioned grayscale processing), the robot performs grayscale processing on the map according to a second preset grayscale threshold to obtain a second map image, that is, obtains another binary image, in which the grayscale value of the pixel point in the map is greater than the second preset grayscale threshold, and its grayscale value is configured as 255, and the color of the pixel point is filled with black; the grayscale value of the pixel point is less than or equal to the second preset grayscale threshold, and its grayscale value is 255. The value is configured as 0, and the color of the pixel is filled with white; the first preset grayscale threshold is less than the second preset grayscale threshold, preferably, when the first preset grayscale threshold is configured as 127, the second preset grayscale threshold is configured as 128; then the robot controls the second-first map image to corrode and then expand to obtain a second-second map image. Compared with the second-first map image, the second-second map image eliminates the small areas with higher brightness in the second-first map image, separates objects at fine points, and for larger objects, smoothes their boundaries without significantly changing their areas, etc., that is, first use the corrosion operation to remove smaller white dots (denoising), and then use the expansion operation to restore the original large white dots, so as to achieve the removal of small black dots (further denoising). Preferably, relative to the full contour line in the first map image, the robot configures the grayscale value of a small portion of the pixels in the full contour line whose grayscale value is originally 255 to 0, and obtains the second map image, which is equivalent to re-marking some of the pixels marked as obstacle contour points in the first map image as passable positions, so that the obstacle contour line in the second map image (included by the full contour line) is shorter than the obstacle contour line in the first map image (included by the target contour line), or the number of obstacle contour lines in the second map image is less than the number of obstacle contour lines in the first map image. Then, the robot extracts the obstacle contour line from the second map image; preferably, the robot extracts the obstacle contour map from the second map image; wherein the obstacle contour map is a collection of obstacle contour lines.
[0030] Preferably, the robot searches for the contour points of the obstacle in a given direction within the second map image, specifically by an eight-neighborhood search, wherein there are pixel points marked as passable positions within the neighborhood of the contour points of the obstacle, and one side of the obstacle contour line is pixel points marked as obstacle-occupied positions and is an occupied area composed of these pixel points, and the other side of the obstacle contour line is pixel points marked as passable positions and is an unoccupied area composed of these pixel points.
[0031] Then, the robot controls the subtraction of the full contour line and the obstacle contour line to obtain the preset boundary line, and determines to extract the preset boundary line, wherein the coverage of the full contour line in the first two map images and the coverage of the obstacle contour line in the second two map images, and the number and types of lines included in the full contour line are more than those included in the obstacle contour line. In the specific implementation process, the robot needs to use the image as a carrier to control the subtraction of the full contour map and the obstacle contour map, and obtain the preset boundary line in the image obtained by the subtraction operation, so that the robot can remove the obstacle contour line from the full contour line; specifically, the robot controls the grayscale value of each pixel point of the full contour map to subtract the grayscale value of the corresponding pixel point in the obstacle contour map to obtain the preset boundary line, that is, only the black line remaining in the image obtained after the two contour maps are subtracted. At this time, the contour line other than the obstacle contour line has been separated from the full contour line, that is, the preset boundary line; preferably, the positional relationship of a pair of subtracted pixel points in the contour map to which they belong relative to the origin of the image coordinate system is the same, the first map image and the second map image are two images of the same size, the full contour map and the obstacle contour map are also two images of the same size, and the origin of the image coordinate system of the full contour map is the same as the origin of the image coordinate system of the obstacle contour map.
[0032] As an embodiment, between step A and step B, it also includes: the robot uses the full contour line (derived from the full contour line extracted in step A) to search for the target obstacle, and then sets the midpoint of the full contour line corresponding to the target obstacle as the simulated edge starting point; wherein, the number of full contour lines extracted in step A is more than one, and each full contour line corresponds to an obstacle, which may be a full contour line corresponding to a unique obstacle, or multiple full contour lines corresponding to one obstacle. Then in step B, the robot starts from the simulated edge starting point and traverses the points in the corresponding full contour line in a preset clockwise direction, wherein the robot does not walk during the process of traversing the full contour line and the points in the full contour line; the preset clockwise direction is equivalent to the simulated edge direction, including the clockwise direction or the counterclockwise direction, then in this embodiment, starting from the simulated edge starting point, the traversal behavior of traversing the points in the corresponding full contour line in a preset clockwise direction is equivalent to a simulated edge behavior.
[0033] It should be noted that the full contour line includes a side route extending around the obstacle contour line and / or an obstacle contour line, so that the full contour line corresponds to the obstacle; wherein the side route extending around the obstacle contour line includes a side line parallel to the obstacle contour line; wherein the distance between the side route and the obstacle contour line is within a preset anti-collision range, specifically the lateral distance between each obstacle contour point and the corresponding side route; the preset anti-collision range is set to be greater than or equal to the body diameter of the robot. If the robot walks along the side route, it is equivalent to walking along the contour line of the terrain, and the robot's forward direction is adjusted to be parallel to the contour line of the terrain. For example, when walking along the contour line of the wall, the robot's forward direction is parallel to the contour line of the wall. At this time, the robot is in the side walking working mode. In this working mode, the robot will mark each position point walked along the side in the map constructed in real time.
[0034] On the basis of the above-mentioned embodiment, the method for the robot to search for the target obstacle using the full contour line includes: the robot searches for the full contour line closest to the current position point of the robot (the corresponding marked position point in the map), and marks the full contour line as the first full contour line; then the obstacle corresponding to the first full contour line with the largest trajectory length is set as the target obstacle, wherein the full contour line corresponding to the target obstacle is the first full contour line with the largest trajectory length, thereby determining in the map that the target obstacle is an obstacle with a continuous contour line and the largest contour line length, and taking the midpoint of the first full contour line with the largest trajectory length as the simulated edge starting point, thereby determining the starting point of the simulated edge behavior. Alternatively, the robot searches for the full contour line with the longest trajectory length and marks the full contour line as the first full contour line; then the obstacle corresponding to the first full contour line closest to the current position point of the robot (the corresponding marked position point in the map) is set as the target obstacle, wherein the full contour line corresponding to the target obstacle is the first full contour line closest to the current position point of the robot, thereby determining in the map that the target obstacle is an obstacle with a continuous contour line and the longest contour line length, and taking the midpoint of the first full contour line closest to the current position point of the robot as the simulated edge starting point, thereby determining the starting point of the simulated edge behavior.
[0035] It is worth noting that in the map, the first full contour line is not a closed line, so that the midpoint of the first full contour line can be obtained. The first full contour line can be regarded as the contour line of the room, such as a wall, wherein the wall can be divided into two adjacent parallel walls, and the contour line of the room, or the contour line segment, can be regarded as the projection line of the wall on the horizontal ground.
[0036] As an embodiment, in step B, the robot traverses the points in the full contour line in a preset clockwise direction, and the method for detecting whether there is a preset boundary point in the neighborhood of the points in the full contour line includes: in the process of the robot traversing the full contour line extracted in step A in a preset clockwise direction starting from the simulated edge starting point, whenever a point in the full contour line (specifically including points in the same full contour line or points in different full contour lines) is traversed, the traversed point is marked as a visited point, and then it is detected whether there is the preset boundary point in the neighborhood of the visited point. If yes, the preset boundary point is stored in a linear storage space in the reverse direction of the preset clockwise direction. The method comprises the steps of selecting and recursing to an end point to save each point in the preset boundary line where the preset boundary point is located into a linear storage space, wherein a point is saved in the linear storage space, including the location information and environmental information of the point, and an index number or an identification number is introduced to mark the storage order of the points in the full contour line in the linear storage space, or to mark the order of the points in the full contour line, and also to record the numbers to represent the navigation order of the robot using a numbering sequence from small to large; wherein the preset boundary points include pixel points marked as passable positions to enhance the accessibility of the robot on the preset boundary line, and in some embodiments also include pixel points marked as obstacle-occupied positions. Preferably, the end point and the simulated edge starting point are two end points of one of the preset boundary lines; and because the robot starts from the simulated edge starting point and traverses the search behavior of the points in the corresponding full contour line in the preset clockwise direction, it is equivalent to a simulated edge behavior. Therefore, in the process of the robot walking in the preset clockwise direction, the order of reading the preset boundary points or the preset boundary lines where they are located from the linear storage space represents the order of the obstacle contour lines actually followed by the robot. The number of preset boundary lines here is not limited to one, and the number of obstacle contour lines here is not limited to one. Among them, the linear storage space includes but is not limited to a stack and a queue. Therefore, this embodiment can orderly explore the location points of the scene in the given clockwise direction by sorting the detected preset boundary lines or preset boundary points during the simulated edge behavior, thereby accelerating the search for the passable area position, including the target point.
[0037] As a data storage method, the robot starts from the simulated edge starting point, and whenever it traverses to a point in the full contour line, the robot caches the traversed points into the stack in sequence according to the preset clockwise order, wherein the simulated edge starting point cached in the stack at the beginning is pushed to the bottom of the stack; then, according to the first-in-last-out principle, the robot controls the data cached in the stack later to be popped out of the stack first, and controls the data cached in the stack earlier to be popped out of the stack later, wherein the data is popped out from the top of the stack when it is needed to read the data; therefore, after the robot caches the points traversed in the preset clockwise direction into the stack in sequence, reading out the points from the stack is equivalent to traversing the cached points in the stack in the reverse direction of the preset clockwise direction, thereby traversing each point in the full contour line in the form of a stack and configuring the access order of each point in the same full contour line and the points in different full contour lines according to the first-in-last-out principle of the stack to form a sequence of points in the full contour line; whenever a point is read from the stack, the point is marked as a visited point to prompt the robot not to repeatedly visit the same point A point, at this time, the points in the full contour line are read in the reverse direction of the preset clockwise direction, and then the preset boundary point is detected in the neighborhood of the visited point. If so, the preset boundary point is pushed into the newly opened stack, and the order of reading the preset boundary points from the newly opened stack is the preset clockwise direction, which is convenient for the robot to walk along the preset boundary line (including the obstacle contour line) where the preset boundary point is located in the preset clockwise direction, and in the actual walking process, the preset boundary point currently along is read from the linear storage space in real time, including the position information and environmental information of the preset boundary point. At this time, the arrangement of the preset boundary points and the preset boundary lines where they are located in the preset clockwise direction constitutes a sequence of preset boundary lines or a sequence of preset boundary points; it can represent the arrangement order of the position points that the robot expects to move through. Specifically, the order in which the preset boundary points are read out from the newly opened stack is conducive to connecting to form a passable path for the robot to traverse the working area.
[0038] It should be noted that when the robot moves on the ground of an unknown room environment to complete related navigation tasks, it is necessary to search for suitable navigation target points in the unknown room environment before the robot moves, so as to perform planned cleaning and planned navigation along the planned path; generally, the indoor environment is divided into multiple rooms by walls, and obstacles such as furniture and appliances are placed on the ground. For easy distinction, obstacles such as furniture and appliances are represented by closed boxes, and the room area is represented as areas where the robot is blocked by obstacles in three of the four directions. It is easy to understand that walls, furniture, appliances and other objects that can block the movement of the robot can be regarded as obstacles.
[0039] As an embodiment, in the step C, according to the passability of the boundary line where the preset boundary point is located detected in step B, the method for determining the reachable boundary point includes: the robot first performs corrosion processing on the obstacle point in the full contour line according to the template image so that the area occupied by the obstacle where the full contour line is located is expanded, wherein the obstacle point is a pixel point marked as a position occupied by the obstacle, and the expansion radius of the template image is equal to the body radius of the robot; the full contour line includes an edge line parallel to the obstacle contour line, and / or an obstacle contour line, so that the full contour line corresponds to the obstacle; the point in the obstacle contour line includes the obstacle point; specifically, the robot uses In the process of corroding the obstacle points in the full contour line with the template image, the template image (equivalent to a side length equal to the body diameter of the robot) is used to extract the obstacle points in the full contour line (which can also be regarded as a point sequence composed in a preset clockwise direction). The obstacle points can be corroded to the left and right sides at the same time, or from left to right, until all the obstacle points in the full contour line are traversed, so that some pixel points marked as passable positions are configured as obstacle points, and smaller white points are removed (denoising), so that the obstacle contour line is smoother, thereby expanding the area occupied by the obstacle where the full contour line is located. Then, the robot starts to execute the filling algorithm from the origin of the map coordinate system, where the origin of the map coordinate system is the starting point of expansion, which is also equivalent to the starting point of filling, and the origin of the map coordinate system is the pixel point of the traversable position; and in the process of expanding from the origin of the map coordinate system to the quadrant area of the map coordinate system, it is determined whether there is a candidate boundary point in the neighborhood of the currently expanded connected point. If so, the candidate boundary point is set as a reachable boundary point and the boundary line to be measured where the candidate boundary point is located is set as the target boundary line, where the target boundary line can be regarded as a valid preset boundary line; otherwise, the candidate boundary point is set as an unreachable boundary point and the boundary line to be measured where the candidate boundary point is located is set as an unreachable preset boundary line; after distinguishing the target boundary line from the unreachable preset boundary line, it is determined that there is no connecting line or boundary line covered by obstacles between the two pixel points. Improve the speed of the robot's search and traversal of the target point.
[0040] Among them, the neighborhood of the connected point can be the four neighborhoods of the connected point; the expansion operation can be regarded as a filling operation, and each expansion to a new connected point according to the filling algorithm is regarded as filling a new connected point in the map, and the expansion end point of the filling algorithm includes the obstacle point; wherein, the connected points expanded to by the robot using the filling algorithm are all pixel points of traversable positions, and are connected to the origin of the map coordinate system, so that the robot starts from the origin of the map coordinate system, walks to the obstacle point according to the expanded connected points, and is blocked by the obstacle point. At this time, the filling algorithm is stopped. Before expanding to the obstacle point, the pixel points filled by the robot are all traversable points of the robot (can be filled with the same color in the map (which can be a map processed by the template image) to distinguish the boundary lines of other adjacent areas).
[0041] It should be noted that the robot marks the preset boundary line where each preset boundary point detected in step B is located as the boundary line to be measured, wherein there are multiple preset boundary points located on the same preset boundary line, and there are multiple preset boundary points also located on multiple discretely distributed preset boundary lines, and the boundary line to be measured belongs to the preset boundary line; when it is detected that the straight-line distance between two points in the boundary line to be measured is greater than the body diameter of the robot, the robot sets the points in the boundary line to be measured as candidate boundary points to ensure that the robot can pass through the boundary line to be measured, and sets the boundary line to be measured as a candidate boundary line; wherein, the straight-line distance between two points in the boundary line to be measured can be the straight-line distance between the two points with the largest spacing in the boundary line to be measured, but based on the aforementioned embodiment, the boundary line to be measured is a contour line separated from the full contour line (corresponding to the result of subtracting the full contour line from the obstacle contour line), so the boundary line to be measured is not necessarily a straight line segment, and the two points with the largest spacing in the boundary line to be measured are not necessarily the two endpoints of the boundary line to be measured.
[0042] It should be noted that when the robot uses the corrosion, expansion, and filling algorithms disclosed in the above embodiments to solve the problem, it needs to construct a data structure that indicates the state characteristics of its own grid position and the relationship between the states of different grid positions. This data structure is called a node, which is replaced by pixel points in the map image. Different problems need to be described with different data structures. Based on the conditions given by the search target point problem, starting from a pixel point, one or more new pixel points can be found. This process is usually called expansion.
[0043] It should be noted that the filling algorithm mentioned in this embodiment can be a seed filling algorithm or a flood filling algorithm; when the filling algorithm is a flood filling algorithm, the robot extracts or fills the nearby nodes connected to it into different colors starting from the origin of the map coordinate system. Whenever there is a candidate boundary point in the neighborhood of the connected point filled (which can be understood as the aforementioned expansion), the robot sets the candidate boundary point as a reachable boundary point; and the filling is maintained until the obstacle point. Whether traversing the obstacle points in the full contour line or traversing the candidate boundary points from the preset boundary line (and the data saved in the previously executed steps A and B), they are all read from the linear storage space, such as the position information of the corresponding points is popped out of the stack in sequence, so that the filling direction or expansion direction of the filling algorithm is consistent with the direction corresponding to the arrangement order of the popped points in the map.
[0044] As an embodiment, the number of reachable boundary points obtained by the robot after executing step C can be one, and the reachable boundary point can be a contour point of the wall, or a position point close to the wall (the distance between the two is less than the body radius of the robot), but when the robot navigates to the reachable boundary point, it is easy to hit the wall. Therefore, the robot needs to set a point that meets the preset passage conditions as the target point within the preset coverage area corresponding to the reachable boundary point, so as to improve the safety of the robot's navigation along the target point. Then in step D, the method in which the robot sets a point that meets the preset passage condition as a target point within the preset coverage area corresponding to the reachable boundary point includes: the robot takes each point in the preset coverage area corresponding to the reachable boundary point as the center point, and circles the corresponding preset coverage area, wherein the preset coverage area corresponding to each of the reachable boundary points, or the preset coverage area corresponding to each point in the preset coverage area corresponding to the reachable boundary point, is a circular area with the point as the center point and a coverage radius of one fuselage radius; the distance between any point in the preset coverage area corresponding to each point and the center point is less than or equal to the fuselage radius; the environmental information marked by the point in the preset coverage area corresponding to each point includes a passable position, and / or an unknown position, and / or an obstacle occupied position, and the corresponding pixel points are, in sequence, the pixel points marked as the passable position, the pixel points marked as the unknown position, and the pixel points marked as the obstacle occupied position. For each pre-defined coverage area, the robot obtains the number of points of various environmental information types in the pre-defined coverage area, and then obtains the passable score of the center point of the pre-defined coverage area by applying the corresponding weight coefficient to the number of points of each environmental information type, so as to form the passable score of a point in the pre-defined coverage area corresponding to the reachable boundary point; in this embodiment, the points of various environmental information types in a pre-defined coverage area include the pixel points marked as passable positions, the pixel points marked as unknown positions, and the pixel points marked as obstacle-occupied positions; in order to set the target point in the passable area, at least in the area with fewer obstacles, regardless of the number of pixel points marked as passable positions, a larger weight coefficient is applied to them; regardless of the number of pixel points marked as obstacle-occupied positions, a smaller weight coefficient is applied to them. It is worth noting that the aforementioned steps perform corrosion operations on the obstacle points, thereby increasing the number of obstacle points in the local area.After the robot obtains the passable score of each point in the preset coverage area corresponding to the reachable boundary point, the point with the largest passable score is set as the target point as the target point obtained in the preset coverage area corresponding to the reachable boundary point, so that the robot walking to the target point does not collide with obstacles, and determines that it meets the preset pass conditions, that is, the point that meets the preset pass conditions is the point with the largest passable score, and is located in the preset coverage area corresponding to the reachable boundary point, not necessarily the reachable boundary point, and not necessarily located in the preset boundary line. When the passable score is larger, the safety factor of the corresponding point is higher, indicating that the point is located in a relatively open area, there are fewer unknown positions and obstacles, the robot walks more safely in the corresponding open area, and when the machine navigates to the target point, at least in the preset coverage area corresponding to the reachable boundary point, it will not encounter obstacles, so that the robot walks in an orderly and obstacle-free manner according to the target point in the actual environment corresponding to the map, or can prevent the robot from walking into a semi-enclosed obstacle area (surrounded by obstacle contours on three sides, with only one opening reserved for the robot to pass).
[0045] Specifically, in the process of the robot obtaining the number of points of various types of environmental information within a preset coverage area, the robot counts the number of pixel points marked as passable positions and records the counted number as the first number of pixel points, which is used to represent the distribution characteristics of the number of pixel points at the passable positions within the same preset coverage area; the robot also counts the number of pixel points marked as unknown positions and records the counted number as the second number of pixel points, which is used to represent the distribution characteristics of the number of pixel points at the unknown positions within the same preset coverage area; the robot also counts the number of pixel points marked as obstacle-occupied positions and records the counted number as the third number of pixel points, which is used to represent the distribution characteristics of the number of pixel points at obstacle-occupied positions within the same preset coverage area. At the same time, the robot assigns a first traffic weight coefficient to pixel points marked as passable positions, and assigns a second traffic weight coefficient to pixel points marked as unknown positions, and assigns a third traffic weight coefficient to pixel points marked as obstacle-occupied positions, wherein the first traffic weight coefficient is greater than the second traffic weight coefficient, and the second traffic weight coefficient is greater than the third traffic weight coefficient. Preferably, the first traffic weight coefficient is a value of 1, the second traffic weight coefficient is a value of 0.2, and the third traffic weight coefficient is a value of -1. Then the robot marks the product of the first pass weight coefficient and the first number of pixels as the weighted result of the passable position, and the robot marks the product of the second pass weight coefficient and the second number of pixels as the weighted result of the unknown position, and the robot marks the product of the third pass weight coefficient and the third number of pixels as the weighted result of the position occupied by the obstacle; then the robot adds the weighted result of the passable position, the weighted result of the unknown position, and the weighted result of the position occupied by the obstacle, and then sets the added result as the passable score of the center point of the preset coverage area, and then the passable score of each point in the preset coverage area corresponding to the reachable boundary point obtained after step C can be obtained, that is, the passable score of each pixel point covered in the preset coverage area is obtained by a similar weighted average calculation. In summary, this embodiment uses the weighted average method of the passable score to evaluate the distribution characteristics of points of various environmental information types, and can also be used as the cost of the robot to pass in the preset coverage area corresponding to a point.
[0046] The present invention also discloses a chip, which is used to store program codes, and the program codes are used to execute the target point search method based on boundary lines, use image processing methods (such as image morphology methods) to extract map contour lines, including full contour lines and preset boundary lines; and find the nearest obstacle on the map contour line, and then simulate the edge behavior to traverse the points in the full contour line, and sort the points in the detected preset boundary lines to plan the actual navigation direction of the robot, and verify the passability of these detected preset boundary lines, leaving only passable preset boundary points, and then use the number weights of pixel points of various environmental types within a fuselage range of the passable preset boundary points to obtain an open area (the free area) that is not easy to collide with obstacles, which can make the robot more efficient and faster when exploring unknown areas.
[0047] The present invention also discloses a robot, which has a chip of the aforementioned embodiment built in, and the chip is used to control the robot according to the target point search method based on the boundary line disclosed in the aforementioned embodiment. In summary, the robot screens the extracted preset boundary points and the boundary lines where the preset boundary points are located according to the passability and preset pass conditions to ensure the stability of the target point selection, and through the robot's passability verification, the robot's target point evaluation and search in a given direction and the planning of the reachability path are realized, ensuring that the robot passes safely in the passable area between obstacles or between obstacles and boundary lines, and also has good real-time performance, and also supports general obstacle contours and non-entity boundary lines, improving the availability of application layer programs; when the robot is a sweeping robot, the passable area and the inaccessible area of the sweeping robot can be constructed, compared with the grid-based A* and other algorithms, the amount of calculation is greatly reduced, the response speed of the system is improved, the screening of the given preset boundary points and preset boundary lines and the calculation tasks of the points, and because the sweeping robot has a simple structure, is light enough, has the characteristics of small resource occupation and rapid response.
[0048] Specifically, the chip is arranged on the circuit board in the body of the cleaning robot, including a computing processor, such as a central processing unit, an application processor, which communicates with a non-temporary memory, such as a hard disk, a flash memory, and a random access memory. The application processor executes a mapping algorithm according to the obstacle information fed back by the visual sensor, such as Simultaneous Localization and Mapping (SLAM), draws a real-time map of the environment where the cleaning robot is located and marks the obstacle position to obtain the corresponding terrain contour line. In some embodiments, the distance information and speed information fed back by the sensing devices such as the laser sensor, cliff sensor, drop sensor (a limit switch trigger device), magnetometer, accelerometer, gyroscope, odometer, etc. provided on the buffer are combined to comprehensively judge the current working state and position of the cleaning robot, as well as the current posture of the cleaning robot, such as passing the threshold, getting on the carpet, being at the cliff of the steps, the dust box is full, being lifted, etc., and specific next action strategies are given for different situations, so that the work of the cleaning robot is more in line with the requirements of the owner and has a better user experience.
[0049] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. The target point search method based on the boundary line is characterized by: The target point search method includes: Step A: The robot extracts the full contour line and preset boundary points from the map; Step B: the robot traverses the points in the full contour line in a preset clockwise direction, and detects whether there are preset boundary points in the neighborhood of the points in the full contour line; Step C, determining a reachable boundary point according to the passability of the boundary line where the preset boundary point detected in step B is located; Step D: In the preset coverage area corresponding to the reachable boundary point, the robot sets a point that meets the preset passage conditions as a target point; Between step A and step B, the method further includes: the robot searches for a target obstacle using a full contour line, and then sets the midpoint of the full contour line corresponding to the target obstacle as a simulated edge starting point; Then, in step B, the robot starts from the simulated edge starting point and traverses the points in a corresponding full contour line in a preset clockwise direction, wherein the robot's posture does not change during the process of traversing the full contour line; The full contour line includes a sideline route extending around the obstacle contour line and / or an obstacle contour line, so that one full contour line corresponds to one obstacle; wherein the distance between the sideline route and the obstacle contour line is within a preset anti-collision range; The method for the robot to search for the target obstacle using the full contour line includes: The robot searches for the full contour line closest to the current position point of the robot, and marks the full contour line as the first full contour line; then sets the obstacle corresponding to the first full contour line with the largest trajectory length as the target obstacle, wherein the full contour line corresponding to the target obstacle is the first full contour line with the largest trajectory length; or, the robot searches for the full contour line with the largest trajectory length, and marks the full contour line segment as the first full contour line; then sets the obstacle corresponding to the first full contour line closest to the current position point of the robot as the target obstacle, wherein the full contour line corresponding to the target obstacle is the first full contour line closest to the current position point of the robot.
2. The target point search method according to claim 1, characterized in that: In step A, the robot extracts the full contour line and the preset boundary line from the map using an image morphology method, wherein the preset boundary point is a point in the preset boundary line, so that whenever the robot extracts the preset boundary line, it obtains the position information of the point in the preset boundary line and the environmental information marked at the point; The preset boundary line is the boundary line between the free area and the unknown area; the unknown area is composed of pixel points marked as unknown positions, and the free area is composed of pixel points marked as passable positions, so that the pixel points marked as unknown positions are distributed on one side of the preset boundary line, and the pixel points marked as passable positions are distributed on the other side of the preset boundary line; The boundary line where the preset boundary point detected in step B is located is the preset boundary line where the preset boundary point is located.
3. The target point search method according to claim 1 or 2, characterized in that: The method for the robot to extract the full contour line and the preset boundary line from the map using the image morphology method includes: The robot uses image morphology methods to extract full contours from the map; The robot uses image morphology methods to extract obstacle contours from the same map; The robot controls the full contour line to be subtracted from the obstacle contour line to obtain the preset boundary line, and determines to extract the preset boundary line.
4. The target point search method according to claim 3, characterized in that: The method for the robot to extract the full contour line and the preset boundary line from the map using the image morphology method includes: The robot performs grayscale processing on the map according to a first preset grayscale threshold to obtain a first map image; then controls the first map image to be corroded and then expanded to obtain a first second map image, and then the robot extracts a full contour map from the first second map image; wherein the full contour map is a collection of full contour lines; the full contour line includes an obstacle contour line and / or an edge route extending around the obstacle contour line; the distance between the edge route and the obstacle contour line is within a preset anti-collision distance range; The robot grayscales the map according to a second preset grayscale threshold to obtain a second-first map image; then controls the second-first map image to be corroded and then expanded to obtain a second-second map image; then the robot extracts an obstacle contour map from the second-second map image; wherein the obstacle contour map is a collection of obstacle contour lines; The robot controls the full contour map to be subtracted from the obstacle contour map to obtain the preset boundary line, so that the robot removes the obstacle contour line from the full contour line; The first preset grayscale threshold is smaller than the second preset grayscale threshold.
5. The target point search method according to claim 1, characterized in that: In step B, the robot traverses points in the full contour line in a preset clockwise direction, and the method for detecting whether there is a preset boundary point in the neighborhood of the points in the full contour line includes: In the process of the robot traversing the full contour line extracted in step A in a preset clockwise direction starting from the simulated edge starting point, whenever the robot traverses to a point in the full contour line, the traversed point is marked as a visited point, and then it is detected whether the preset boundary point exists in the neighborhood of the visited point. If so, the preset boundary point is stored in a linear storage space in a reverse direction of the preset clockwise direction, so that in the process of the robot walking in the preset clockwise direction, the order of reading the preset boundary points from the linear storage space represents the order of the obstacle contour line actually followed by the robot; The preset boundary points include the pixel points marked as passable locations.
6. The target point search method according to claim 3, characterized in that: In step C, according to the passability of the boundary line where the preset boundary point is located detected in step B, the method for determining the reachable boundary point includes: The robot first erodes the obstacle points in the full contour line according to the template image so as to expand the area occupied by the obstacle where the obstacle points are located, wherein the obstacle points are pixel points marked as the positions occupied by the obstacles, and the expansion radius of the template image is equal to the body radius of the robot; the full contour line includes the edge route extending around the obstacle contour line, and / or the obstacle contour line; the points in the obstacle contour line include the obstacle points; Then, the robot starts to execute the filling algorithm from the origin of the map coordinate system. In the process of expanding from the origin of the map coordinate system to the quadrant area of the map coordinate system, it is determined whether there is a candidate boundary point in the neighborhood of the currently expanded connected point. If yes, the candidate boundary point is set as a reachable boundary point; wherein the connected points expanded by the robot using the filling algorithm are all pixel points of traversable positions, and the expanded connected points are connected to the origin of the map coordinate system; Among them, the robot marks the preset boundary line where each preset boundary point detected in step B is located as the boundary line to be tested; when it is detected that the straight-line distance between two points in the boundary line to be tested is greater than the body diameter of the robot, the robot sets the point in the boundary line to be tested as a candidate boundary point.
7. The target point search method according to claim 1, characterized in that: In step D, the method in which the robot sets a point that meets the preset passage condition as a target point within the preset coverage area corresponding to the reachable boundary point includes: The robot respectively takes each point in the preset coverage area corresponding to the reachable boundary point as the center point, and delineates the corresponding preset coverage area; For each predefined coverage area, the robot obtains the number of points of various environmental information types in the predefined coverage area, and then obtains the passable score of the center point of the predefined coverage area by applying a corresponding weight coefficient to the number of points of each environmental information type, so as to form the passable score of a point in the predefined coverage area corresponding to the reachable boundary point; After the robot obtains the passable score of each point in the preset coverage area corresponding to the reachable boundary point, the robot sets the point with the largest passable score as the target point, so that the robot walking to the target point does not collide with obstacles and determines that the preset pass condition is met; Among them, the preset coverage area corresponding to each point is a circular area with the point as the center point and a coverage radius of one fuselage radius; the distance between any point in the preset coverage area corresponding to each point and the center point is less than or equal to the fuselage radius; the environmental information marked by the point in the preset coverage area corresponding to each point includes a passable position, and / or an unknown position, and / or a position occupied by an obstacle.
8. The target point search method according to claim 7, characterized in that: In the process of the robot acquiring the number of points of various types of environmental information in a preset coverage area, the robot counts the number of pixel points marked as traversable positions and records the counted number as a first number of pixel points, the robot also counts the number of pixel points marked as unknown positions and records the counted number as a second number of pixel points, and the robot also counts the number of pixel points marked as obstacle-occupied positions and records the counted number as a third number of pixel points; The robot assigns a first pass weight coefficient to the pixel points marked as passable positions, and the robot assigns a second pass weight coefficient to the pixel points marked as unknown positions, and the robot assigns a third pass weight coefficient to the pixel points marked as obstacle-occupied positions, wherein the first pass weight coefficient is greater than the second pass weight coefficient, and the second pass weight coefficient is greater than the third pass weight coefficient; The robot then marks the product of the first pass weight coefficient and the first number of pixels as the weighted result of the passable position, and marks the product of the second pass weight coefficient and the second number of pixels as the weighted result of the unknown position, and marks the product of the third pass weight coefficient and the third number of pixels as the weighted result of the position occupied by the obstacle; then the robot adds the weighted results of the passable position, the weighted results of the unknown position, and the weighted results of the position occupied by the obstacle, and sets the added result as the passable score of the center point of the preset coverage area.
9. A chip, characterized in that: The chip is used to store program codes, and the program codes are used to execute the boundary line-based target point search method described in any one of claims 1 to 8.
10. A robot, characterized in that: The robot is built with the chip described in claim 9.
Citation Information
Patent Citations
Mobile robot, edge moving method thereof and computer storage medium
CN114253267A
Cited By
Robot map exploration method based on reachable boundary points and chip
CN121383985A
Robot map exploration method based on reachable boundary points and chip
CN121383985B
