Method for searching optimal collision point based on preset detection distance range

By searching for laser points in the laser frame within a preset detection distance range and determining the optimal collision point based on the number of connected pixels, the problem of misjudgment when cleaning robots identify the boundaries of continuous obstacles is solved, thus improving navigation stability and the accuracy of obstacle recognition.

CN116465404BActive Publication Date: 2026-06-05AMICRO SEMICONDUCTOR CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AMICRO SEMICONDUCTOR CO LTD
Filing Date
2022-01-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

When performing cleaning tasks, cleaning robots have difficulty accurately identifying the boundaries of continuous obstacles, leading to misjudgments when walking along the edges and affecting navigation stability.

Method used

By searching for laser points in the laser frame within a preset detection distance range, the optimal collision point is determined based on the number of connected pixels. The coordinates of the optimal collision point are marked, and the physical location reflected by the collision point is determined as the optimal collision point.

Benefits of technology

This improves the effectiveness of the robot in recognizing obstacle contour points, reduces misjudgments, enhances the stability and adaptability of edge walking, and ensures that the robot navigates along continuous obstacles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116465404B_ABST
    Figure CN116465404B_ABST
Patent Text Reader

Abstract

The application discloses a searching method for an optimal collision point within a preset detection distance range. The searching method comprises searching a grid satisfying a first preset connectivity condition in a preconfigured map, marking the coordinates of the grid satisfying the first preset connectivity condition as the coordinates of an optimal collision point in the preconfigured map, and determining that the physical position reflected by a laser point corresponding to the first preset connectivity condition is the optimal collision point. The grid satisfying the first preset connectivity condition is a grid corresponding to a first effective laser point in the preconfigured map, wherein the first effective laser point has a best neighborhood connectivity pixel number greater than a preset pixel number threshold, a maximum best neighborhood connectivity pixel number, and a minimum laser distance. The first effective laser point is a laser point with a laser distance within the preset detection distance range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of laser navigation and positioning, and in particular to a method for searching for the optimal collision point within a preset detection distance range. Background Technology

[0002] Currently, cleaning robots equipped with laser navigation and positioning functions clean within a rectangular area of ​​size M x N (typically 4 meters by 4 meters). Within each 4m x 4m area, the robot first moves along the edge of the area before cleaning. For the first 4m x 4m area, it needs to find a starting point for edge-moving, traversing the boundary of the first 4m x 4m area before beginning cleaning. For the i-th 4m x 4m area (where i is an integer greater than 1), after cleaning the previous 4m x 4m area, when navigating to the next 4m x 4m area, it directly moves along the boundary of the current area. Note that one boundary within each 4m x 4m area is a wall.

[0003] Because the grid map built by the cleaning robot in real time has limited environmental information, and the laser data used to build the map itself contains noise, even if the cleaning robot is placed in the same location, the starting point for starting edge walking will not always be near continuous obstacles (such as walls). The cleaning robot may mark the starting point near some protruding and insurmountable discontinuous obstacles (such as pillars or wooden strips). The robot will then start from this starting point and walk along the outline of the discontinuous obstacle such as the pillar, instead of walking along the wall or other continuous obstacles. As a result, the robot may not start walking along the boundary of the first 4m by 4m area. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention searches for laser points within a preset detection distance range. Based on the characteristic of the number of connected pixels of the laser points, it identifies continuous obstacles such as walls and determines the optimal collision point within a local area, thus avoiding misjudgments that could affect the stability of the robot's navigation. Specific technical solutions include:

[0005] The optimal collision point search method based on a preset detection distance range includes searching for grids that satisfy a first preset connectivity condition within a pre-configured map, marking the coordinates of the grids that satisfy the first preset connectivity condition as the coordinates of the optimal collision point within the pre-configured map, and determining that the physical location reflected by the laser point corresponding to the first preset connectivity condition is the optimal collision point. The grids that satisfy the first preset connectivity condition are: within the pre-configured map, the grid corresponding to the first effective laser point whose number of best neighbor connected pixels is greater than a preset pixel number threshold, has the largest number of best neighbor connected pixels, and has the smallest laser distance. The first effective laser point is a laser point whose laser distance is within the preset detection distance range.

[0006] Furthermore, the preset range of the grid corresponding to a first effective laser point covers the grid corresponding to the first effective laser point; wherein, the optimal number of connected pixels in the neighborhood of a first effective laser point is the maximum value among the number of connected pixels of all grids within the preset range of the grid corresponding to the first effective laser point in the pre-configured map; one grid corresponds to one number of connected pixels; wherein, the laser distance is used to reflect the distance between the detected obstacle and the laser sensor installed on the robot.

[0007] Furthermore, a laser point is used to characterize the reflection position of the laser emitted by the robot's laser sensor on an obstacle; there is a grid corresponding to the laser point in the pre-configured map; wherein, the laser point originates from the laser frame collected by the robot; wherein, the laser point is located within the effective detection angle range of the laser sensor and is mapped to the corresponding grid in the pre-configured map; within the effective detection angle range, one laser point corresponds to one unit detection angle, one laser point corresponds to one grid, and one laser point corresponds to one laser distance.

[0008] Further, the method for searching for grids that satisfy the first preset connectivity condition within the pre-configured map includes: whenever all grids within a preset range of a grid corresponding to a first effective laser point are searched, marking the first effective laser point with a number of best neighboring connected pixels greater than a preset pixel number threshold as a first target laser point; when all grids within a preset range of each grid corresponding to a first effective laser point are searched, if it is determined that only one first target laser point exists, marking the grid corresponding to the first target laser point as a grid that satisfies the first preset connectivity condition, and marking the coordinates of the grid corresponding to the first target laser point as the coordinates of the optimal collision point within the pre-configured map, and... The physical location of the first and second target laser points is determined to be the optimal collision point. When all grids within the preset range of the grid corresponding to each first effective laser point have been searched, if it is determined that there are at least two first and second target laser points, the grid corresponding to the first and second target laser points with the smallest laser distance is marked as a grid that satisfies the first preset connectivity condition, and the coordinates of the grid corresponding to the first and second target laser points with the smallest laser distance are marked as the coordinates of the optimal collision point in the pre-configured map. The physical location of the first and second target laser points is determined to be the optimal collision point. Among them, the first and second target laser points are the first target laser points with the largest number of best neighbor connected pixels in the pre-configured map.

[0009] Furthermore, the source of the coordinates of the grid corresponding to the laser point includes: using the trigonometric function conversion result of the laser distance of the laser point as the coordinate offset, offsetting the coordinates of the laser point, and then converting the coordinates of the laser point after the coordinate offset into grid coordinates according to a preset ratio, so as to realize the conversion of the laser point into the coordinate system of the pre-configured map.

[0010] Furthermore, the effective detection angle range of the laser sensor is from 0 degrees to 360 degrees, and there are 360 ​​laser points in the laser frame, each corresponding to a different laser distance; the laser distance of a laser point changes with the unit detection angle at which the laser point is located, and the unit detection angle at which the laser point is located is within the effective detection angle range of the laser sensor.

[0011] Furthermore, the preset range of the grid corresponding to the laser point is the range of the neighboring grids of the grid corresponding to the laser point, including the grid corresponding to the laser point.

[0012] Furthermore, the preset range of the grid corresponding to the laser point is the four neighboring areas of the grid corresponding to the laser point, including the grid corresponding to the laser point and the adjacent grids above, below, left, and right centered on the grid corresponding to the laser point, so as to reduce the amount of coordinate calculation.

[0013] Furthermore, the grid corresponding to each laser point is represented by pixels in the pre-configured map, and each pixel is represented by a grid of a specific size; the pre-configured map is an image of a specific size mapped from the laser points collected by the robot's laser sensor; wherein, in the pre-configured map, each obstacle is composed of adjacent pixels with the same pixel value, such that each obstacle in the pre-configured map is composed of adjacent grids.

[0014] Furthermore, the number of connected pixels of a grid is the number of grids contained in the connected region in which the grid is located, such that the grid corresponding to a laser point corresponds to a connected region; wherein, a connected region is an image region composed of pixels with the same pixel value and adjacent positions, or a set of grids composed of adjacent grids with the same pixel value, and each grid or each pixel in the same connected region has the same number of connected pixels.

[0015] Furthermore, before searching for grids that meet preset connectivity conditions within a preset range of the grids corresponding to the laser points, a closing operation is first performed on the pre-configured map to ensure that the outlines of the obstacles marked in the pre-configured map are fully described. The closing operation is used to connect the connected regions in the pre-configured map. The pre-configured map is a specific-sized image constructed by the robot to describe the positional characteristics of the laser points, in order to adapt to the actual obstacle distribution characteristics.

[0016] Furthermore, the closing operation includes placing the pre-configured location Figure 2 After scalarization, a binarized map is obtained. Then, image dilation is performed on the binarized map, followed by image erosion. This process converts some pixels representing non-obstacles into pixels representing obstacles, thus filling the gaps in the obstacle outlines in the binarized map that has not undergone image dilation and erosion. In the binarized map, the pixel values ​​of the pixels representing obstacles are different from those of the pixels representing non-obstacles.

[0017] Compared with existing technologies, this invention searches for grids with good connectivity within a preset range of grids corresponding to laser points with small distribution areas within a pre-configured map. These grids are then designated as grids that meet a first preset connectivity condition. The coordinates of these grids are marked as the coordinates of the optimal collision point. Thus, this invention can search for collision points with reasonable laser distances in large continuous obstacles as the optimal collision point. This allows the robot to stably walk along the corresponding continuous obstacles (ideally navigating until they collide). This reduces the probability of selecting the outline of an isolated obstacle as the collision point, and also reduces the probability of selecting a location where there is no obstacle in the actual physical environment. This enhances the adaptability of the optimal collision point to the surrounding environment and improves the effectiveness of the robot in recognizing the outline of obstacles, facilitating edge walking along obstacles with better continuity. Attached Figure Description

[0018] Figure 1 This is a flowchart of an embodiment of the present invention, which discloses an optimal collision point search method based on a preset detection distance range.

[0019] Figure 2 This is a flowchart of a method for searching for grids that satisfy a first preset connectivity condition, as disclosed in another embodiment of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. To further illustrate the embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. The flowchart depicts a process or method. Although the flowchart describes the steps as sequential processes, many of the steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0021] As one embodiment, the optimal collision point search method based on a preset detection distance range provided by this invention can be executed by a laser point cloud data processing device. This device can be implemented by software and / or hardware, and is generally integrated into a laser navigation robot. The laser navigation robot can then serve as the execution subject of the method. This robot can be equipped with a laser sensor that can detect obstacles. The laser beam emitted by the laser sensor scans the data reflected back from the surfaces of objects surrounding the robot, forming point cloud data of the surrounding objects. These objects can then be identified as obstacles and marked on a map. The point cloud data includes the positional information of the obstacle surface scanned by the laser beam of the laser sensor, i.e., the longitudinal distance, lateral offset, and detection angle of the scanned obstacle surface relative to the laser sensor. The point cloud can be considered a collection of laser points. When constructing the map, laser frames are used to divide the laser points. A laser frame is a collection of laser points scanned by the laser sensor over 360 degrees, i.e., a point cloud frame. The data of a single laser point represents the positional information (including laser distance) of the obstacle surface scanned by the laser beam emitted from a detection angle direction of the laser sensor. In typical scenarios, when a laser-guided robot moves indoors, it can detect the presence of obstacles in its surroundings using laser sensors and mark them on a map in real time. This requires the use of the latest generated laser frames, which contain multiple laser points and can be considered a collection of laser points. The laser frame data includes the data of the laser points. When marking obstacle information on the map, the laser points included in the laser frame are used, thereby constructing a two-dimensional point cloud model of the surrounding environment of the laser-guided robot based on SLAM technology. A pre-configured map can be constructed from the pre-obtained laser frames. Hereinafter, the laser-guided robot will be referred to as the robot. The pre-configured map is a map that has not been processed by the optimal collision point search method. It is a map of the robot's first working area, which is a local area within the room area where the robot is located. It can mark the farthest obstacle in the room area where the robot is located, so that the robot has a sufficiently large passable area in the first working area. The area of ​​the robot's first working area is smaller than the area of ​​the room area where the robot is located. Preferably, the pre-configured map is a rectangular map area. The length and width of the rectangular map area are adaptively set in advance according to the size of the actual working environment or according to the distribution characteristics of obstacles.

[0022] Specifically, the robot's internal controller reads laser point cloud data or depth images including laser point cloud data collected by the laser sensor in real time, constructs a point cloud model to create a point cloud map, and projects and converts the point cloud map into world coordinates, transforming it into a two-dimensional grid map, i.e., a pre-configured map, which reflects the environmental information detected by the robot on the travel plane. This pre-configured map is considered a map image, and two-dimensional landmark information corresponding one-to-one with the point cloud positions of the pre-configured map (two-dimensional point cloud map) is generated to facilitate related image processing operations within the pre-configured map. In the map coordinate system of the pre-configured map, i.e., the aforementioned two-dimensional grid coordinate system, the origin of the map coordinate system of the pre-configured map can be defined at the robot's drive wheel, the mounting position of the laser sensor, or the center of the robot body, without limitation. In the pre-configured map, the coordinates of each grid cell are the coordinates of its lower left corner, upper left corner, or lower right corner. In some implementation scenarios, the center position of the grid cell represents the actual geographical location of the scanned area, and the coordinates of each grid cell are represented by the coordinates of its center position. The coordinates of the relevant corner points and the center position of the grid cell can also represent the row and column numbers of the grid cell in the pre-configured map, with the horizontal coordinate equal to the column number and the vertical coordinate equal to the row number. In this embodiment, the coordinates of the grid cell corresponding to the laser point are the coordinates of the laser point transformed into the pre-configured map, also known as the map coordinates of the laser point. Accordingly, the grid cell corresponding to the laser point is directly understood as the map coordinate point corresponding to the laser point; the coordinates of the grid cell corresponding to the laser point are directly understood as the map coordinates of the laser point.

[0023] In some embodiments of the pre-configured map, the grid is traversed from left to right, with column numbers increasing progressively; and from bottom to top, with row numbers increasing progressively. This ensures that the paths generated by connecting each grid within the pre-configured map are continuous. Preferably, the pre-configured map or the global grid map containing the pre-configured map consists of row cells and column cells, starting from the top left corner of the cell. The row direction is used as the y-coordinate, and the column direction is used as the x-coordinate. The coordinates of each cell are defined by its row and column position, and each cell is the grid. A single cell represents the grid corresponding to a laser point, and a series of adjacent cells represent lines. The set of adjacent cells can represent an area. Each cell has a value to represent category data, such as the type of environmental information marked or the type of obstacle.

[0024] In this embodiment, the grid corresponding to each laser point collected by the robot's laser sensor is represented by pixels in the pre-configured map. Each pixel is represented by a grid of a specific size, which is each grid in the aforementioned two-dimensional grid map. Pixels serve as unit pixels in the pre-configured map, and grids serve as unit grids in the pre-configured map, ensuring that one laser point corresponds to one grid. Preferably, under the map configuration condition where pixels are configured as grids in the pre-configured map, the robot configures one pixel as a 5 cm x 5 cm cell to fill the grid of the pre-configured map. In this case, the grid is equivalent to a 5 cm x 5 cm cell, and one laser point corresponds to one grid. Therefore, in this embodiment, for a pre-configured map or a local map within the pre-configured map, one grid corresponds to only one connected component. The size of this connected component is the number of connected pixels, also known as the connectivity number, which can be selectively stored in the corresponding grid. The number of pixels constituting the connected component reflects the size of the obstacle.

[0025] In edge navigation scenarios, the robot typically first searches for the nearest wall obstacle. After navigating to and touching the surface of this obstacle, the robot enters edge-following mode. It then adjusts its direction and begins walking along the wall. Within the same room, the four walls are continuous and integrated, not isolated obstacles. The robot only begins normal operation after traversing the entire outer contour. However, because the robot can only perceive the environment through laser point data, and laser frame data (a frame of point cloud data, a frame of laser point data, or a frame of laser data) only provides data from 360 degrees of laser points, the accuracy of identifying continuous obstacles like walls is low. Furthermore, the collected laser points are unstable, and a single frame of laser data (laser point data) is prone to noise, causing gaps in the wall boundaries marked on the pre-configured map, or leading the robot to identify isolated obstacles (protruding, insurmountable, and immovable obstacles) as walls and prioritize walking along the edges around pillars. It should be added that, in this invention, objects against a wall are considered as walls, and wall obstacles include obstacles that are attached to the wall, obstacles that are attached to the wall surface and distributed along the wall, and the wall and its attached objects.

[0026] Specifically, when the robot collides with an obstacle collision point within the nearest wall obstacle, this invention needs to search for the most suitable obstacle collision point. It also needs to determine if this collision point contains suitable continuous obstacles that facilitate the robot's movement along the edge, allowing the robot to navigate to the point of contact or collision with this obstacle collision point. Before the robot begins moving, this location is configured as the robot's edge-following starting point. To enter edge-following operation mode, the robot preferentially navigates to this edge-following starting point and contacts the most suitable obstacle collision point on its body. Therefore, this embodiment of the invention, by executing the optimal collision point search method, finds an effective wall boundary point that is reasonably far from the robot's body and has a relatively dense distribution of laser points, and configures it as the optimal collision point.

[0027] The basic concept of the optimal collision point search method includes: the robot searches for grids that satisfy a first preset connectivity condition within the pre-configured map; the coordinates of these grids are then marked as the coordinates of the optimal collision point within the pre-configured map; and the physical location reflected by the laser point corresponding to the grid satisfying the first preset connectivity condition is determined to be the optimal collision point. Specifically, the laser point corresponding to the grid satisfying the first preset connectivity condition is configured as the optimal collision point, the coordinates of the laser point are used as the coordinates of the optimal collision point in the actual physical environment, and the coordinates of the grid corresponding to the laser point are used as the coordinates of the optimal collision point in the pre-configured map. This improves the effectiveness of the robot in recognizing the contour points of obstacles, facilitating edge-walking along obstacles with better continuity.

[0028] It should be noted that the laser points collected by the robot correspond to the grids in the pre-configured map. The laser data currently collected by the robot can be converted to the grids of the map constructed by the robot to facilitate the calculation and processing of connected grids. However, the neighborhood of the grid corresponding to the laser point may exceed the boundary of the pre-configured map.

[0029] Optionally, before executing the optimal collision point search method, the laser data currently collected by the robot has been converted into the pre-configured map in real time, which may mark obstacle information in an unstable state.

[0030] It should be noted that after the robot starts walking along the edge in the area defined by the pre-configured map, the obstacle to which the optimal collision point belongs is the first obstacle that the robot walks along. At this time, the starting point of the robot's edge movement is not the optimal collision point, but a position near the optimal collision point that allows the robot to contact the obstacle to which the optimal collision point belongs. At this time, the robot can determine that it can contact the obstacle to which the optimal collision point belongs at the first navigation target position.

[0031] In one implementation, after the robot detects the wall in real time, this embodiment is equivalent to projecting the real-time detection data of the wall onto the pre-configured map to form the ground area where the wall is located. Then, the wall is constructed as the two-dimensional planar boundary of the pre-configured map through the Connected Components With Stats algorithm, so that the detection data of the wall is converted by the robot into the ground area where the wall is located. This can be understood as the line segment of the actual detected outline boundary of the wall projected onto the ground. That is, the representation of the continuous obstacle disclosed in this embodiment in the pre-configured map can be used as the boundary line of the robot's first working area.

[0032] It should be noted that the robot starts from any position in the room to search for wall obstacles (continuous obstacles). When it detects a wall or collides with a wall, it is triggered to enter the edge-walking mode. In the edge-walking mode, the robot adjusts its forward direction to be parallel to the wall outline or the boundary line projected onto the ground, thus achieving edge-walking. Then, the current detected wall position is marked as the edge-walking start point. This edge-walking start point can also be the point where the robot collides with the obstacle, but it is not the aforementioned optimal collision point. It can be in the neighborhood of the grid corresponding to the optimal collision point or within a preset distance range of the optimal collision point, and it is not occupied by the obstacle. Then, the robot walks along the current forward direction, keeping the current forward direction parallel to the wall outline or the boundary line projected onto the ground, thus achieving edge-walking.

[0033] In addition, the robot's coordinates and the angle of its forward movement (the angle of the robot's forward direction relative to the X-axis of the map coordinate system or the angle of the robot's forward direction relative to the Y-axis of the map coordinate system) are recorded in the map (which can be equivalent to the pre-configured map) built by the robot in real time. Then, starting from this edge-based starting point, the robot moves along the edge (walks along the wall) while keeping parallel to the wall surface. The robot's forward direction is adjusted to be parallel to the direction of the wall's extension.

[0034] A grid that satisfies the first preset connectivity condition is: within the pre-configured map, the grid corresponding to the first effective laser point whose number of best neighbor connected pixels is greater than a preset pixel number threshold, has the largest number of best neighbor connected pixels, and has the smallest laser distance. In this embodiment, the source of the grid that satisfies the first preset connectivity condition includes, among the laser points falling into the pre-configured map, taking the grid corresponding to the first effective laser point as the center grid (seed grid), selecting the connected pixel number with the largest value from the connected pixel number corresponding to each grid in the center grid and its neighboring grids, as the best neighbor connected pixel number of the grid corresponding to the first effective laser point, and participating in the comparison of the best neighbor connected pixel number of each first effective laser point falling into (transformed to) the pre-configured map. This ensures that within the pre-configured map, the grid corresponding to the first effective laser point whose number of best neighbor connected pixels is greater than the preset pixel number threshold, has the largest number of best neighbor connected pixels, and has the smallest laser distance is used as the grid that satisfies the first preset connectivity condition. It should be noted that not all grids within the preset range of each first effective laser point are necessarily located within the pre-configured map, and not all grids corresponding to the first effective laser point are necessarily located within the pre-configured map. Laser points whose laser distance is within the preset detection distance range; In this embodiment, the robot can select the number of connected pixels to describe the size of the obstacle, so that the grids that meet the first preset connectivity conditions are configured as the grids occupied by the continuous obstacle. Preferably, the preset detection distance range is greater than the robot's body radius (when the robot is a circular-shelled sweeping robot) but less than 1.5 meters. Then, laser points within the preset detection distance range are all first effective laser points. The feature of the number of connected pixels of the first effective laser points is used to search for grids that meet the requirements. This can search for effective continuous obstacles in a large connected area, especially to find collision points in this type of obstacle that are reasonably far from the robot's current position (the point where the robot can be navigated to collide with the obstacle, which is the location point occupied by the obstacle). This eliminates interference from the data information of laser points reflected back by more isolated obstacles, reduces the probability of fitting isolated obstacle line segments of non-negligible length as physical walls, and reduces the impact of misjudging contour line segments as walls.

[0035] In this embodiment, the preset range of the grid corresponding to a first effective laser point covers the grid corresponding to the first effective laser point. Specifically, the preset range of the grid corresponding to the first effective laser point is the range of the neighboring grids of the grid corresponding to the first effective laser point, including the grid corresponding to the first effective laser point. In this embodiment, the preset range of the first effective laser point is configured because noise factors may exist in the first effective laser point or the grid corresponding to the first effective laser point. It is necessary to expand the grid outward from the grid corresponding to the first effective laser point as the center grid in a preset expansion direction, and then perform the search within the expanded grid area. The optimal neighboring connected pixel count of a first effective laser point is the maximum value among all grids within a preset range of the grid corresponding to the first effective laser point in the pre-configured map, specifically within the overlapping area of ​​the preset range of the grid corresponding to the first effective laser point and the pre-configured map. By enumerating and comparing the connected pixel count of each grid within the aforementioned overlapping area, the grid with the largest connected pixel count can be obtained. This maximum connected pixel count within the preset range of the first effective laser point is then configured as the optimal neighboring connected pixel count of the first effective laser point. This is because the optimal neighboring connected pixel count is the search result within the grid area expanded from the grid corresponding to the first effective laser point. This method is beneficial for searching for large, continuous obstacles, such as walls, thereby eliminating the interference of straight lines from non-continuous obstacles (isolated, insurmountable protruding obstacles such as wooden strips and pillars), improving the robot's accuracy and intelligence in distinguishing between wall and non-wall obstacles.

[0036] In summary, this embodiment of the invention searches for grids with good connectivity within a preset range of the grids corresponding to laser points with a small distribution area within a pre-configured map. These grids are then identified as satisfying a first preset connectivity condition. The coordinates of these grids are then marked as the coordinates of the optimal collision point. Therefore, this invention can search for obstacle collision points with reasonable laser distances within large, continuous obstacles, reducing the probability of selecting locations along the contours of isolated obstacles as collision points, and also reducing the probability of selecting locations where obstacles do not exist in the actual physical environment. This enhances the adaptability of the optimal collision point to the surrounding environment and improves the effectiveness of the robot in recognizing obstacle contours, facilitating edge-walking along obstacles with better continuity.

[0037] In the aforementioned embodiment, the laser beam emitted by the laser sensor scans the data reflected back from the surface of objects surrounding the robot's body, forming a point cloud of the surrounding objects. The laser point is used to characterize the reflection position of the laser emitted by the robot's laser sensor on the obstacle. The laser point originates from the laser frame collected by the robot. The laser frame is a collection of laser points scanned by the laser sensor in 360 degrees, i.e., a frame of point cloud. The optimal collision point is a position occupied by a continuous obstacle, such as a boundary point of a wall or a gap. The laser point is located within the effective detection angle range of the laser sensor and is mapped to the corresponding grid of the pre-configured map. Specifically, the laser data is converted from the laser radar coordinate system to the map coordinate system, which can convert the laser distance into a grid representation. In a point cloud frame, within the effective detection angle range, one laser point corresponds to one unit detection angle (the scanning angle of the laser beam emitted by the laser sensor), one laser point corresponds to one grid, and one laser point corresponds to one laser distance. The laser distance reflects the distance between the detected obstacle and the laser sensor installed on the robot. The laser distance can be the distance between the reflection position of the obstacle and the center of the robot's body, and can be adjusted according to the map coordinate system setting. The map coordinate system of the pre-configured map can be defined at the robot's drive wheel, the mounting position of the laser sensor, or the center of the body, without limitation. The effective detection angle range includes multiple unit detection angles, and the number of unit detection angles within an effective detection angle range is equal to the number of laser points included in a point cloud frame (laser frame).

[0038] In this embodiment, the effective detection angle range of the laser sensor is 0 to 360 degrees. There are 360 ​​laser points in the laser frame, each corresponding to a different laser distance. Therefore, in the corresponding grid space, the laser distance at a unit detection angle of 0 degrees is 1 meter, and the laser distance at a unit detection angle of 1 degree is 1.1 meters. Thus, in this embodiment, there is one laser point and one laser distance within each unit detection angle. The laser distances for different laser points within the corresponding laser frame are not equal. This facilitates the unified conversion of laser points with large data volume and high discreteness collected by the laser sensor to the map coordinates of the pre-configured map. This ensures that the obtained discrete laser point data can be described in the same coordinate system and also facilitates the identification and organization of coordinate information and grid numbers belonging to the same connected domain within the same coordinate system.

[0039] In some embodiments, one grid corresponds to one number of connected pixels. In other embodiments, all grids within a preset range of a grid corresponding to a first effective laser point may be interconnected to form an independent connected domain. In this case, the number of connected pixels of all grids within the preset range of a grid corresponding to a first effective laser point is equal.

[0040] It is worth noting that when a laser point falls into a grid corresponding to the pre-configured map, the coordinates of the laser point are converted into the coordinates of a grid in the pre-configured map. However, for different laser frames, a grid may allow multiple laser points to fall into it, and the coordinates of multiple different laser points can be converted into the coordinates of the same grid. In some embodiments, the preset range of a grid includes the grid itself and its neighboring grid areas, but its neighboring grid areas may not necessarily fall into the corresponding laser point. It is possible that only the grid within the preset range will fall into the laser point.

[0041] As one example, such as Figure 1 As shown, the optimal collision point search method includes: Step S1, acquiring a pre-configured map and acquiring laser frames; specifically, the robot acquires a pre-configured map that has been marked with obstacle information, and simultaneously acquires the laser frames currently collected by the laser sensor, including the data of the laser points in the currently collected frame (laser data collected within the effective detection angle range of 360 degrees), so as to facilitate the processing of the connectivity of the laser points included in the laser frame in the pre-configured map. Then proceed to step S2.

[0042] Step S2: Search for grids that meet the first preset connectivity condition within the pre-configured map, and then proceed to step S3. In this embodiment, the grid searched by the robot within the pre-configured map can correspond to a collected laser point, and the grid corresponding to this laser point can be used as a seed grid. It should be noted that when a laser point falls into a grid corresponding to the pre-configured map, the coordinates of the laser point are converted to the coordinates of a grid in the pre-configured map. However, a grid can allow multiple laser points to fall into it, that is, without being limited to the same laser frame, the coordinates of multiple different laser points can be converted to the coordinates of the same grid. The currently collected laser point may not necessarily fall within the neighboring grid area of ​​the grid.

[0043] Step S3: Mark the coordinates of the grids that satisfy the first preset connectivity condition as the coordinates of the optimal collision point in the pre-configured map, that is, the coordinates of the optimal collision point in the corresponding map coordinate system. After the robot searches for the grids that satisfy the first preset connectivity condition in the pre-configured map, it obtains the coordinates of the grids that satisfy the first preset connectivity condition, which are configured as the coordinates of the optimal collision point in the coordinate system of the pre-configured map. Accordingly, the robot can obtain the coordinates of the laser point corresponding to the grid as the positioning coordinates of the optimal collision point in the actual physical environment (in the lidar coordinate system).

[0044] It should be added that within the laser frame, there are laser points at different laser distances, and the coordinates of each laser point are coordinates in the lidar coordinate system. Specifically, the laser points corresponding to the grids currently searched by the robot within the pre-configured map all originate from the laser frames currently acquired by the robot; one laser point corresponds to one laser distance.

[0045] The optimal collision point search method described in steps S1 to S3 above obtains the optimal edge starting point, i.e. the optimal collision point, based on the laser point data satisfying the first preset connectivity condition within the pre-configured map. This method filters out noise points within a preset detection distance range in the pre-configured map by enumerating laser points, and has a certain adaptability to unstable maps and unstable laser data. It avoids the situation where there are actually no obstacles at the obstacle collision point obtained at a relatively close distance, i.e., it avoids the situation where there are no obstacles that should be along the edge near the starting position of the robot's actual edge-walking.

[0046] As one example, such as Figure 2 As shown, the method for searching for grids that satisfy the first preset connectivity condition within a pre-configured map includes:

[0047] Step S201: After searching all grids within a preset range corresponding to a first effective laser point, the first effective laser point with a better neighbor connected pixel count greater than a preset pixel count threshold is marked as the first target laser point; then proceed to step S202. Specifically, during the process of the robot searching for grids within a preset range corresponding to a first effective laser point, the robot sorts and compares the number of connected pixels of each grid in the pre-configured map, obtains the maximum number of connected pixels, and then configures the maximum number of connected pixels as the best neighbor connected pixel count of the first effective laser point. When the best neighbor connected pixel count is greater than the preset pixel count threshold, the first effective laser point is marked as the first target laser point. Preferably, the preset pixel number threshold is configured to 16. Meanwhile, the preset range of the grid corresponding to the first effective laser point is the four neighboring areas of the grid corresponding to the first effective laser point, which is beneficial for filtering invalid laser data. The number of connected pixels in the best neighboring area of ​​a laser point can reflect the size characteristics of the obstacle where the laser point is located. When the obstacle to be searched is larger and the continuous outline of the obstacle is longer, the corresponding number of connected pixels in the best neighboring area is larger. Therefore, the preset pixel number threshold needs to be configured to be larger, which can be used to identify walls.

[0048] It should be noted that the number of connected pixels for each grid is obtained in advance and stored in an associated index address within the robot according to the grid's coordinate information in the pre-configured map. The coordinate offset of the grid relative to the origin of the map coordinate system is associated with this index address. In some embodiments, the vertical coordinate offset of the grid relative to the origin can be multiplied by the length of the pre-configured map in the horizontal direction and then added to the horizontal coordinate offset of the grid relative to the origin to obtain the result as the index address of the number of connected pixels of the grid. Preferably, the connected domain information of the grid is also stored in this index address.

[0049] Specifically, in step S201, within the pre-configured map, whenever a grid with the largest number of connected pixels is found within a preset range of the grid corresponding to the first effective laser point, if it is determined that the number of connected pixels of the grid is greater than a preset pixel number threshold, then the first effective laser point is marked as the first target laser point, the number of connected pixels of the grid is marked as the number of connected pixels in the best neighboring area corresponding to the first target laser point, and the laser distance of the first effective laser point is marked as the laser distance of the first target laser point. At the same time, the laser distance of the first target laser point and the number of connected pixels in the best neighboring area are recorded, so as to facilitate comparison with the information of the same type found in subsequent searches, in order to obtain a larger number of connected pixels in the best neighboring area, thereby achieving accurate identification of continuous obstacles.

[0050] Step S202: After searching all grids within the preset range of each first effective laser point, determine whether there is only one first and second target laser point. If yes, proceed to step S203; otherwise, proceed to step S204. In this embodiment, the robot successively enumerates and compares the number of connected pixels of each grid within the preset range of each first effective laser point to obtain the first and second target laser points. At this point, the robot has completed the traversal of all laser points falling within the preset detection distance range and completed the search of all grids or neighboring grids within the preset detection distance range. That is, the robot completes the search of the number of connected pixels of the grid within a range greater than one body radius and less than 1.5 meters or other restricted effective detection distances.

[0051] It should be noted that whenever all grids within a preset range corresponding to the first effective laser point are searched within the area defined by the pre-configured map, the first target laser point with the largest number of connected pixels is marked as the first second target laser point; then the first second target laser point is the first target laser point with the largest number of connected pixels in the best neighborhood within the pre-configured map.

[0052] Step S203: If it is determined that only one first and second target laser point is detected, the grid corresponding to the first and second target laser point is marked as a grid that satisfies the first preset connectivity condition, and the coordinates of the grid corresponding to the first and second target laser point are marked as the coordinates of the optimal collision point in the pre-configured map. The physical location of the first and second target laser point is determined to be the optimal collision point, and the continuous obstacle is determined to exist at the grid corresponding to the first and second target laser point. That is, the robot recognizes the wall-type continuous obstacle for the robot to walk along the edge.

[0053] Step S204: If it is determined that at least two first and second target laser points are detected, the grid corresponding to the first and second target laser point with the smallest laser distance is marked as a grid that satisfies the first preset connectivity condition, and the coordinates of the grid corresponding to the first and second target laser point with the smallest laser distance are marked as the coordinates of the optimal collision point in the pre-configured map. It is determined that the physical location of the first and second target laser points is the optimal collision point, and it is determined that there is a continuous obstacle at the grid corresponding to the first and second target laser points. That is, the robot recognizes the wall-type continuous obstacle for the robot to walk along the edge.

[0054] In summary, steps S201 to S204 search for grids that satisfy the first preset connectivity condition within a preset range of the grids corresponding to the laser points with limited distribution range. Then, the coordinates of the grids that satisfy the first preset connectivity condition are marked as the coordinates of the optimal collision point. The effective boundary points of continuous obstacles are searched in the area of ​​the robot's body that is relatively close to it. That is, the grids that satisfy the first preset connectivity condition are obtained by searching for the number of connected pixels with the largest value. The laser point corresponding to this grid is used as the optimal collision point. Subsequently, after the robot navigates to the obstacle at the optimal collision point and comes into contact with it, it starts to walk along the edge. Specifically, it walks along the contour edge of the contacted obstacle, and its forward direction is parallel to the contour line of the obstacle. Therefore, this invention can search for obstacle collision points with reasonable laser distances in large continuous obstacles as the optimal collision points, allowing the robot to stably walk along the corresponding continuous obstacles (preferably navigating until the two collide), reducing the probability of selecting the outline of isolated obstacles as the obstacle collision point, and also reducing the probability of selecting the location where there are no obstacles in the actual physical environment as the obstacle collision point. This enhances the adaptability of the optimal collision point to the surrounding environment, improves the effectiveness of the robot in recognizing the outline points of obstacles, and facilitates edge walking along obstacles with better continuity.

[0055] It should be added that in the indoor environment where the robot works, the obstacle boundaries on both sides of the left and right endpoints of the gap refer to obstacle boundaries that are continuous within a certain area, usually containing multiple boundary points rather than just one. For example, the gap can be a doorway in a room, and the obstacles on both sides of the doorway are the four walls of the same room. The four walls are continuous and integral, and are not isolated obstacles. Therefore, this embodiment can distinguish between wall obstacles and isolated obstacles (protruding obstacles that cannot be crossed or pushed) through the aforementioned steps S201 to S204, overcoming the problem that the robot cannot accurately identify walls based solely on the laser data contained in the laser frame. This can reduce the occurrence of misjudgments of obstacle collision points, such as avoiding using the area near a wooden strip as the starting point for the robot to walk along the edge.

[0056] As one embodiment, the coordinates of the grid corresponding to the laser point are obtained from: the coordinate offset calculated by a trigonometric function of the laser distance of the laser point, including horizontal axis coordinate offset and vertical axis coordinate offset; optionally, in the trigonometric function calculation result of the laser distance of the laser point, the horizontal axis coordinate offset is obtained by adding the cosine function value of the laser distance of the laser point to a reference horizontal coordinate; the vertical axis coordinate offset is obtained by adding the sine function value of the laser distance of the laser point to a reference vertical coordinate; thus realizing the conversion of the laser distance of the laser point into coordinates. Then, according to the horizontal axis coordinate offset and the vertical axis coordinate offset, the laser point is controlled to perform coordinate offset calculation, that is, the coordinates of the laser point in the lidar coordinate system are controlled to perform coordinate offset calculation according to the horizontal axis coordinate offset and the vertical axis coordinate offset; then, according to a preset ratio, the coordinates of the laser point after coordinate offset are converted into grid coordinates, which are integer grid numbers, thus realizing the transformation of the laser point into the coordinate system of the pre-configured map, thereby realizing the rasterization processing of the laser point in a unified coordinate system, allowing the discrete point cloud data obtained by the robot to be described in the same map coordinate system. In this embodiment, the laser point includes the first effective laser point.

[0057] In some embodiments, the coordinate offset calculation process needs to consider the coordinate axis directions of the coordinate systems before and after the transformation. Generally, the coordinate offset calculation method is related to the direction of the horizontal axis of the two coordinate systems before and after the transformation. When the positive directions of the horizontal axis of the two coordinate systems before and after the transformation are the same, the horizontal coordinate of the laser point in the lidar coordinate system is reduced by the horizontal axis coordinate offset to obtain the horizontal coordinate of the laser point after the coordinate offset; otherwise, the horizontal axis coordinate offset is reduced by the horizontal coordinate of the laser point in the lidar coordinate system to obtain the horizontal coordinate of the laser point after the coordinate offset. Similarly, the coordinate offset calculation method is related to the direction of the vertical axis of the two coordinate systems before and after the transformation. When the positive directions of the vertical axis of the two coordinate systems before and after the transformation are the same, the vertical coordinate of the laser point in the lidar coordinate system is reduced by the vertical axis coordinate offset to obtain the vertical coordinate of the laser point after the coordinate offset; otherwise, the vertical axis coordinate offset is reduced by the vertical coordinate of the laser point in the lidar coordinate system to obtain the vertical coordinate of the laser point after the coordinate offset.

[0058] In some embodiments, the laser distance of a laser point changes with the detection angle at which the laser point is located. This detection angle is within the effective detection angle range of the laser sensor. Each laser point falls within a unit detection angle, each laser point corresponds to a laser distance, and each laser distance corresponds to a unit detection angle. Preferably, the effective detection angle range of the laser sensor is 0 to 360 degrees. Therefore, 360 laser points are acquired in the laser frame, each corresponding to a different laser distance. When the unit detection angle is 1 degree, 360 sector regions are divided. Each laser point in the laser frame falls within one sector region. For each sector region, the laser distance is different.

[0059] In the foregoing embodiments, the preset range of the grid corresponding to the laser point is the range of the neighboring grids of the grid corresponding to the laser point, including the grid corresponding to the laser point. The laser point includes a first valid laser point. The range of the neighboring grids of the grid corresponding to the laser point includes, but is not limited to, a 4-neighborhood, an 8-neighborhood, or a 12-neighborhood centered on the grid corresponding to the laser point. In this embodiment, the preset range is set considering the presence of noise in the acquired laser points. It is necessary to expand a neighboring grid outwards in a preset direction from the grid corresponding to the laser point as the center grid, and then search within the expanded grid area. This reduces the error caused by the noise carried by the central grid. Furthermore, it is easier to search for continuous obstacles within the expanded grid area, which is also a result of considering the connectivity of the region.

[0060] Preferably, the preset range of the grid corresponding to the laser point is the four neighboring areas of the grid corresponding to the laser point, including the grid corresponding to the laser point and the adjacent grids above, below, left and right centered on the grid corresponding to the laser point. Compared with the grid area or circular area of ​​eight neighboring areas, fewer grids are searched, thereby reducing the amount of coordinate calculation.

[0061] In some embodiments, the grid corresponding to each laser point is represented by pixels within the pre-configured map, and each pixel is represented by a grid of a specific size, such that one laser point corresponds to one grid. Preferably, the pre-configured map configures pixels as grids, with one pixel configured as a 5 cm x 5 cm cell, and one laser point corresponding to one map grid. However, one map grid also corresponds to only one connected component, and the size of this connected component is the number of connected pixels. The number of pixels constituting the connected component reflects the size of the obstacle.

[0062] The pre-configured map is a specific-sized image mapped from laser points collected by the robot's laser sensors. Within this pre-configured map, each obstacle is composed of adjacent pixels with the same pixel value, forming a grid of adjacent pixels. Specifically, the pre-configured map is processed using connected component analysis, a technique already known in the art. This allows obstacles at different locations to be marked as being composed of pixels with different pixel values, and also as being composed of pixels of different colors. For example, in an indoor environment where the robot operates, if the obstacle boundaries on either side of a gap are not connected, these boundaries are marked with pixels of different colors. Specifically, the obstacle boundary on the left side of the gap is composed of pixels in a blue connected region, consisting of 46 connected pixels, meaning each pixel within the blue connected region has 46 connected pixels. The obstacle boundary on the right side of the gap is composed of pixels in a green connected region, consisting of 92 connected pixels, meaning each pixel within the green connected region has 92 connected pixels. When the obstacle boundaries on both sides of the gap refer to the continuous obstacle boundaries within a certain area, such as the gap being a doorway to a room, and the obstacles on both sides of the doorway being the four walls of the same room, and the four walls being continuous and integrated, not isolated obstacles, then the obstacles on both sides of the gap are marked with pixels of the same color, resulting in a relatively large number of connected pixels.

[0063] In some embodiments, the preset pixel count threshold is a judgment threshold in the pre-configured map used to represent the number of adjacent grids of a continuous obstacle. This ensures that when the number of connected pixels of a corresponding grid is determined to be greater than the preset pixel count threshold, the robot identifies the location of that grid as having a continuous obstacle, or determines that the number of connected pixels of a corresponding grid greater than the preset pixel count threshold indicates the presence of a continuous obstacle in that grid. This facilitates the search for grids with a larger number of connected pixels and the obstacles formed by their connected grids.

[0064] It should be noted that the number of connected pixels of a grid is the number of grids contained in the connected region where the grid is located, so that the grid corresponding to a laser point corresponds to a connected region. Here, a connected region is an image area composed of pixels with equal pixel values ​​and adjacent positions. When each grid corresponding to a laser point is represented by a pixel in the pre-configured map in this embodiment, the connected region is a set of grids composed of adjacent grids with the same pixel value; then each grid or each pixel in the same connected region has the same number of connected pixels.

[0065] Connected component analysis (also known as connected component labeling) refers to identifying and labeling connected regions within the image to which the pre-configured map belongs, thereby marking obstacles at each location. Generally, in connected component analysis, a foreground pixel is first selected as a seed. Then, based on the two basic conditions for connected regions (same pixel value and adjacent position), foreground pixels adjacent to the seed are merged into the same pixel set. The resulting pixel set constitutes a connected region. In the pre-configured map of this embodiment, the relevant connectivity conditions are: if a target grid has an adjacent position and equal pixel value within the neighboring grid region of the seed grid, then connectivity can be established. The neighboring grid region of the seed grid can be the range of its upper, lower, left, and right adjacent grids. That is, when any of the upper, lower, left, or right adjacent grids of the seed grid is a target grid with equal pixel value, the seed grid and the target grid are connected, a new label value is assigned, the number of connected grids is counted, and the grid with the new label value is configured as connected. For each connected raster, it is determined whether the neighboring raster regions of the connected raster contain target rasters with the same pixel value. If so, the connection continues until the neighboring raster regions of the final connected raster have no target rasters with the same pixel value. That is, when all the raster regions of the final connected raster are non-target rasters, the connection ends. Then, a connected region corresponding to the point cloud data contained in the target raster during the current connection process can be obtained. At this time, the number of connected rasteres counted is the number of connected pixels in the connected region, which is also the number of connected pixels of any raster in the connected region.

[0066] Based on the aforementioned embodiments, the grids within a preset range of the grid corresponding to a laser point match at least one type of connected pixel quantity, including 0, wherein each type of connected pixel quantity represents a connected domain, and thus represents a clustering result of the laser point; then among all the grids within the preset range of the grid corresponding to a laser point, there exists a grid with the largest number of connected pixels, such that the number of connected pixels of this grid is configured as the optimal neighboring connected pixel quantity of the second effective laser point.

[0067] As an example of a pre-configured map, before searching for grids that meet preset connectivity conditions within a preset range of the grids corresponding to the laser points, the robot first performs a closing operation on the pre-configured map before executing the aforementioned step S1. This allows the outlines of the marked obstacles in the pre-configured map to be fully described. The closing operation connects connected components to facilitate the selection of the accurate grid position corresponding to the most recently acquired laser point. This represents a morphological restoration of the marked pixels in the pre-configured map, particularly smoothing the outline boundaries of the marked obstacles. This improves the accuracy of the map information obtained in step S1 and the grid information used in step S2, reducing the impact of noise information carried in the laser frames obtained in step S1.

[0068] It should be noted that the pre-configured map is a specific-sized image constructed by the robot to describe the positional characteristics of the laser points, adapting to the actual obstacle distribution characteristics. It is also a map constructed by the robot based on previously acquired laser frames before acquiring the current laser frame in step S1. The area defined by the pre-configured map can be a 4m*4m square region.

[0069] Specifically, the closing operation includes: binarizing a map image region of a specific size in a pre-built map by the robot to obtain a binarized map; then performing image dilation on the binarized map, followed by image erosion on the binarized map after image dilation, so that some pixels representing non-obstacles are configured as pixels representing obstacles, thereby filling the gaps in the outlines of obstacles in the binarized map that has not undergone image dilation and image erosion; wherein, in the binarized map, the pixel values ​​of pixels representing obstacles and pixels representing non-obstacles are different. Generally, pixels with a pixel value of 255 are configured as obstacles, and pixels with a pixel value of 0 are configured as non-obstacles. Since the same obstacle that was originally connected may be divided into multiple segments in the binarized map, the reason may be that the pre-built map by the robot is unstable, or the laser data is unstable, causing the map to not reflect reality; therefore, this embodiment repairs the missing parts between the same obstacles through the aforementioned closing operation.

[0070] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0071] In the above embodiments, a robot capable of performing sweeping tasks (hereinafter referred to as a sweeping robot) is used as an example to illustrate the technical solution of this application, but it is not limited to sweeping robots. The robot in the various embodiments of this application refers to any mechanical device capable of highly autonomous spatial movement in its environment, such as a sweeping robot, a companion robot, or a guide robot, or it can be an air purifier, a self-driving vehicle, etc. Of course, the tasks performed by different robot forms will vary, and this is not limited thereto.

[0072] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for searching the optimal collision point within a preset detection distance range, characterized in that, The optimal collision point search method includes: The grid that satisfies the first preset connectivity condition is searched in the pre-configured map. The coordinates of the grid that satisfies the first preset connectivity condition are then marked as the coordinates of the optimal collision point in the pre-configured map. The physical location reflected by the laser point that satisfies the first preset connectivity condition is determined to be the optimal collision point. Among them, the grid that satisfies the first preset connectivity condition is: the grid corresponding to the first effective laser point in the pre-configured map where the number of best neighbor connected pixels is greater than the preset pixel number threshold, the number of best neighbor connected pixels is the largest, and the laser distance is the smallest. The first effective laser point is a laser point whose laser distance is within the preset detection distance range; the optimal number of connected pixels in the neighborhood of a first effective laser point is the maximum value among the number of connected pixels of all grids within the preset range of the grid corresponding to the first effective laser point in the pre-configured map; one grid corresponds to one number of connected pixels.

2. The optimal collision point search method according to claim 1, characterized in that, A preset range of the grid corresponding to a first effective laser point covers the grid corresponding to that first effective laser point; Among them, laser distance is used to reflect the distance between the detected obstacle and the laser sensor installed on the robot.

3. The optimal collision point search method according to claim 2, characterized in that, A laser point is a location on an obstacle where a laser emitted by a robot's laser sensor is reflected; a grid corresponding to a laser point exists in a pre-configured map. The laser points are derived from laser frames collected by the robot. The laser point is located within the effective detection angle range of the laser sensor and is mapped to the corresponding grid of the pre-configured map; Within the effective detection angle range, one laser point corresponds to one unit detection angle, one laser point corresponds to one grid, and one laser point corresponds to one laser distance.

4. The optimal collision point search method according to claim 3, characterized in that, The method for searching for grids that satisfy the first preset connectivity condition within a pre-configured map includes: After searching all grids within a preset range of the grid corresponding to a first effective laser point, the first effective laser point whose number of connected pixels in its best neighborhood is greater than a preset pixel number threshold is marked as the first target laser point. When all grids within the preset range of each first effective laser point have been searched, if it is determined that there is only one first and second target laser point, the grids corresponding to the first and second target laser points are marked as grids that satisfy the first preset connectivity condition, and the coordinates of the grids corresponding to the first and second target laser points are marked as the coordinates of the optimal collision point in the pre-configured map, and the physical location of the first and second target laser points is determined to be the optimal collision point. When all grids within the preset range of each first effective laser point have been searched, if it is determined that there are at least two first and second target laser points, the grid corresponding to the first and second target laser point with the smallest laser distance is marked as a grid that satisfies the first preset connectivity condition, and the coordinates of the grid corresponding to the first and second target laser point with the smallest laser distance are marked as the coordinates of the optimal collision point in the pre-configured map, and the physical location of the first and second target laser points is determined to be the optimal collision point; Among them, the first and second target laser points are the first target laser points with the largest number of best neighbor connected pixels in the pre-configured map.

5. The optimal collision point search method according to claim 3, characterized in that, The coordinates of the grid corresponding to the laser point are obtained by: using the trigonometric function conversion result of the laser distance of the laser point as the coordinate offset, offsetting the coordinates of the laser point, and then converting the coordinates of the laser point after the coordinate offset into grid coordinates according to a preset ratio, so as to convert the laser point into the coordinate system of the pre-configured map.

6. The optimal collision point search method according to claim 5, characterized in that, The effective detection angle range of the laser sensor is 0 degrees to 360 degrees. There are 360 ​​laser points in the laser frame, each corresponding to 360 different laser distances. The laser distance of the laser point changes with the unit detection angle at which the laser point is located, and the unit detection angle at which the laser point is located is within the effective detection angle range of the laser sensor.

7. The optimal collision point search method according to claim 6, characterized in that, The preset range of the grid corresponding to the laser point is the range of the neighboring grids of the grid corresponding to the laser point, including the grid corresponding to the laser point.

8. The optimal collision point search method according to claim 7, characterized in that, The preset range of the grid corresponding to the laser point is the four neighboring areas of the grid corresponding to the laser point, including the grid corresponding to the laser point and the adjacent grids above, below, left and right centered on the grid corresponding to the laser point, so as to reduce the amount of coordinate calculation.

9. The optimal collision point search method according to claim 7, characterized in that, Each laser point corresponds to a grid represented by pixels within the pre-configured map, and each pixel is represented by a grid of a specific size; the pre-configured map is a specific-sized image mapped from the laser points collected by the robot's laser sensors; In the pre-configured map, each obstacle is composed of adjacent pixels with the same pixel value, such that each obstacle is composed of adjacent grids in the pre-configured map.

10. The optimal collision point search method according to claim 9, characterized in that, The number of connected pixels of a grid is the number of grids contained in the connected region in which the grid is located, so that the grid corresponding to a laser point corresponds to a connected region. A connected region is an image region consisting of pixels with the same pixel value and adjacent positions, or a set of grids consisting of adjacent grids with the same pixel value. Each grid or pixel in the same connected region has the same number of connected pixels.

11. The optimal collision point search method according to claim 10, characterized in that, Before searching for grids that meet preset connectivity conditions within a preset range of the grids corresponding to the laser points, a closing operation is performed on the pre-configured map to ensure that the outlines of the obstacles marked in the pre-configured map are fully described. The closing operation is used to connect the connected domains in the pre-configured map. The pre-configured map is a specific-sized image constructed by the robot to describe the positional characteristics of the laser points, adapted to the actual obstacle distribution characteristics.

12. The optimal collision point search method according to claim 11, characterized in that, The closing operation includes: After binarizing the pre-configured map, a binarized map is obtained; then, image dilation processing is performed on the binarized map, and then image erosion processing is performed on the binarized map after image dilation processing, so that some pixels representing non-obstacles are configured as pixels representing obstacles, so that the gaps in the outline of obstacles in the binarized map that has not undergone image dilation and image erosion processing are filled. In a binary map, the pixel values ​​of pixels representing obstacles are different from those of pixels representing non-obstacles.