Optimal collision point search method based on laser point, chip and robot
By searching for grids that meet preset connectivity conditions within a pre-configured map and marking the optimal collision point, the problem of unstable navigation for cleaning robots is solved, achieving more stable edge walking and navigation.
Patent Information
- Application Number
- CN202210029259.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-01-12
AI Technical Summary
When cleaning robots clean indoors, the large amount of point cloud data acquired by the laser sensor is discrete, resulting in a blurry map. The robot has difficulty finding the starting point of obstacles along the edge, leading to unstable navigation and unstable edge walking patterns.
By searching for grids that meet preset connectivity conditions within a pre-configured map, the optimal collision point is marked. The optimal collision point is then determined using the connectivity features and distance information of the laser points to facilitate the robot's movement along the edge.
It reduces the probability of the robot colliding with isolated obstacles, enhances the stability of navigation and the accuracy of edge walking, overcomes the problems of laser data noise and map instability, and improves environmental adaptability.
Smart Images

Figure CN116466694B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of laser navigation positioning, and particularly to an optimal collision point search method based on laser points, a chip and a robot. BACKGROUND
[0002] Currently, a cleaning robot with a laser navigation positioning function needs to find a starting position for walking along the boundary of a room before performing cleaning work in a room. The cleaning robot starts walking along the boundary of the room from the starting position, walks along the boundary of the room, and then starts cleaning the room.
[0003] The point cloud data obtained by the laser sensor of the cleaning robot has the characteristics of large data volume and high dispersion, resulting in that the laser data for constructing a map carries noise. The laser frame used by the laser point cloud map constructed by the robot in advance has a small number of frames, so that the laser point cloud map is relatively fuzzy. Therefore, even if the cleaning robot is placed at the same location, the robot will find multiple obstacle collision positions at the same time, so that the cleaning robot will navigate to different obstacle collision positions and collide with the obstacles at the corresponding positions, and then start walking along the boundary (which can be walking along the wall surface), thereby causing the navigation result of the cleaning robot to be unstable and the walking along the boundary mode to be unstable. SUMMARY
[0004] To solve the above technical problems, the present application searches for each laser point of a laser frame and searches for an optimal collision point according to the pixel number characteristics of the connected domain where the landing point of the laser point on a map is located, so as to enable the robot to start walking along the largest continuous obstacle closest to the robot from a stable position. The specific technical solutions include:
[0005] The optimal collision point search method based on laser points includes searching for a grid satisfying a preset connected condition in a preconfigured map, marking the coordinates of the grid satisfying the preset connected condition as the coordinates of an optimal collision point in the preconfigured map, and determining that the physical position reflected by the laser point corresponding to the grid satisfying the preset connected condition is the optimal collision point.
[0006] Further, the method for searching a grid satisfying a preset connectivity condition in the preconfigured map and marking the coordinates of the grid as the coordinates of the optimal collision point comprises: when a grid satisfying a first preset connectivity condition is searched in the preconfigured map, marking the coordinates of the grid as the coordinates of the optimal collision point in the preconfigured map; after no grid satisfying the first preset connectivity condition is searched in the preconfigured map, searching a grid satisfying a second preset connectivity condition in the preconfigured map, and marking the coordinates of the grid as the coordinates of the optimal collision point in the preconfigured map; wherein the preset connectivity condition comprises the first preset connectivity condition or the second preset connectivity condition.
[0007] Further, when no grid satisfying the first preset connectivity condition is searched and no grid satisfying the second preset connectivity condition is searched, a laser point with the minimum laser distance is searched in the laser frame, and the coordinates of the grid corresponding to the laser point are marked as the coordinates of the optimal collision point in the preconfigured map; wherein the laser points searched by the robot are all from the laser frame collected by the robot; one laser point corresponds to one laser distance.
[0008] Further, the laser point is used to represent the reflection position of the laser emitted by the laser sensor of the robot on the obstacle, and the laser point is from the laser frame collected by the robot; wherein the laser point is located in the effective detection angle range of the laser sensor and is mapped into the corresponding grid of the preconfigured map; in 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, and the laser distance is used to reflect the distance between the detected obstacle and the laser sensor installed on the robot.
[0009] Further, the grid satisfying the first preset connectivity condition is a grid corresponding to a first effective laser point with the maximum number of connected pixels in the best neighborhood, the maximum number of connected pixels in the best neighborhood and the minimum laser distance in the preconfigured map, wherein the preset range of one grid corresponding to one first effective laser point covers the grid corresponding to the first effective laser point; wherein the number of connected pixels in the best neighborhood of one first effective laser point is the maximum value among the numbers of connected pixels of all grids in the overlapping area between the preset range of the grid corresponding to the first effective laser point and the preconfigured map; one grid corresponds to one number of connected pixels; wherein the first effective laser point is a laser point with a laser distance within a preset detection distance range.
[0010] Further, the method of searching for a grid satisfying the first preset connectivity condition in the preconfigured map comprises: whenever all the grids in the preset range of the grid corresponding to a first effective laser point are searched, marking the first effective laser point with a best neighborhood connectivity pixel number greater than a preset pixel number threshold as a first first-target laser point; when all the grids in the preset range of the grid corresponding to each first effective laser point are searched, if it is determined that there is only one first second-target laser point, marking the grid corresponding to the first second-target laser point as a grid satisfying the first preset connectivity condition, marking the coordinates of the grid corresponding to the first second-target laser point as the coordinates of the optimal collision point in the preconfigured map, and determining that the physical position point where the first second-target laser point is located is the optimal collision point; when all the grids in the preset range of the grid corresponding to each first effective laser point are searched, if it is determined that there are at least two first second-target laser points, marking the grid corresponding to the first second-target laser point with the minimum laser distance as a grid satisfying the first preset connectivity condition, marking the coordinates of the grid corresponding to the first second-target laser point with the minimum laser distance as the coordinates of the optimal collision point in the preconfigured map, and determining that the physical position point where the first second-target laser point is located is the optimal collision point; wherein the first second-target laser point is the first first-target laser point with the maximum number of best neighborhood connectivity pixels in the preconfigured map.
[0011] Further, after all the grids in the preset range of the grid corresponding to each first effective laser point are searched, if no grid with a connectivity pixel number greater than a preset pixel number threshold is searched in the preconfigured map, it is determined that no grid satisfying the first preset connectivity condition is searched in the preconfigured map, and then searching for the grid satisfying the second preset connectivity condition in the preconfigured map is started; wherein the connectivity pixel number is used to reflect the size of the obstacle, so that the grid satisfying the first preset connectivity condition or the grid satisfying the second preset connectivity condition is configured as the grid occupied by the continuous obstacle.
[0012] Further, the grid satisfying the second preset connectivity condition is the grid corresponding to a second effective laser point with the minimum laser distance and the best neighborhood connectivity pixel number greater than a preset pixel number threshold in the preconfigured map; wherein the preset range of the grid corresponding to one second effective laser point covers the grid corresponding to the second effective laser point; wherein the best neighborhood connectivity pixel number of one second effective laser point is the maximum value among the connectivity pixel numbers of all the grids in the overlapping area of the preset range of the grid corresponding to the second effective laser point and the preconfigured map; wherein the second effective laser point is a laser point with a laser distance associated with the size of the fuselage; the distribution range of the second effective laser point in the preconfigured map is greater than the distribution range of the first effective laser point in the preconfigured map.
[0013] Further, the method of searching for a grid satisfying the second preset connectivity condition in the preconfigured map comprises: whenever all the grids in the preset range of the grid corresponding to a second effective laser point are searched, if the number of the best neighborhood connectivity pixels of the second effective laser point is greater than the preset pixel number threshold, the second effective laser point is marked as a second target laser point; when all the grids in the preset range of the grid corresponding to each second effective laser point are searched, the grid corresponding to the second target laser point with the minimum laser distance is marked as the grid satisfying the second preset connectivity condition, the coordinates of the grid corresponding to the second target laser point are marked as the coordinates of the optimal collision point in the preconfigured map, and the physical position where the second target laser point is located is determined as the optimal collision point.
[0014] Further, after all the grids in the preset range of the grid corresponding to each second effective laser point are searched, if no grid with the number of connectivity pixels greater than the preset pixel number threshold is searched in the preconfigured map, it is determined that no grid satisfying the second preset connectivity condition is searched in the preconfigured map, then the laser point with the minimum laser distance is searched in the laser frame, the coordinates of the grid corresponding to the laser point are marked as the coordinates of the optimal collision point in the preconfigured map, and the physical position where the laser point is located is determined as the optimal collision point.
[0015] Further, the source of the coordinates of the grid corresponding to the laser point comprises: taking the trigonometric function conversion result of the laser distance of the laser point as a coordinate offset, offsetting the coordinates of the laser point, and 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 preconfigured map.
[0016] Further, the effective detection angle range of the laser sensor is 0 degrees to 360 degrees, and there are 360 laser points in the laser frame, which correspond to 360 different laser distances respectively; wherein the laser distance of the laser point changes with the unit detection angle where the laser point is located, and the unit detection angle where the laser point is located is within the effective detection angle range of the laser sensor.
[0017] Further, the preset range of the grid corresponding to the laser point is the neighborhood grid range of the grid corresponding to the laser point, and comprises the grid corresponding to the laser point.
[0018] Further, the preset range of the grid corresponding to the laser point is the four neighborhoods of the grid corresponding to the laser point, and comprises the grid corresponding to the laser point and the adjacent grids above, below, left and right of the grid corresponding to the laser point, so as to reduce the calculation amount of coordinates.
[0019] 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; 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.
[0020] 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.
[0021] Furthermore, before searching for grids that meet preset connectivity conditions within the pre-configured map, a closing operation is performed on the pre-configured map to fully describe the outlines of the marked obstacles in the pre-configured map. The closing operation is used to connect 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.
[0022] Furthermore, the closing operation includes placing the pre-configured location Figure Two After denoising, a binarized map is obtained; then, image dilation is performed on the binarized map, and then image erosion is performed on the binarized map after image dilation, so that some pixels representing non-obstacles are configured as pixels representing obstacles; in the binarized map, the pixel values of the pixels representing obstacles are different from the pixel values of the pixels representing non-obstacles.
[0023] A chip with a built-in control program for controlling a robot to perform the optimal collision point search method.
[0024] A robot equipped with a laser sensor that supports 360-degree detection, the robot having the aforementioned chip built into it.
[0025] Compared with the prior art, the present application firstly searches the grid satisfying the first preset connectivity condition in the preset range of the grid corresponding to the laser point with a smaller distribution range in a preconfigured map, and then marks the coordinates of the grid as the coordinates of the optimal collision point; if the grid satisfying the first preset connectivity condition is not searched in the preset range of the grid corresponding to the laser point with a smaller distribution range, the grid satisfying the second preset connectivity condition is searched in the preset range of the grid corresponding to the laser point with a larger distribution range, and then the coordinates of the grid are marked as the coordinates of the optimal collision point. Thus, the present application can search an optimal collision point in the largest continuous obstacle closest to the robot body, overcome the problem of noise or instability of the collected laser data (including the coordinates of the laser point, the detection angle and the laser distance) in the prior art, filter the noise information in the image area corresponding to the preconfigured map, reduce the probability of selecting the position of the isolated obstacle colliding with the robot as the optimal collision point, and further reduce the probability of the robot preferentially selecting the isolated obstacle for edge walking. The probability of selecting the position that cannot collide with the obstacle or the position that cannot detect the obstacle in the actual physical environment as the starting point of the robot edge walking is also reduced, and the environmental adaptability of the searched optimal collision point is enhanced. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure One is a flowchart of the optimal collision point search method based on a laser point disclosed by an embodiment of the present application.
[0027] Figure Two is a flowchart of the method for searching the grid satisfying the first preset connectivity condition disclosed by another embodiment of the present application.
[0028] Figure Three is a flowchart of the method for searching the grid satisfying the second preset connectivity condition disclosed by another embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings of the embodiments of the present application. In order to further illustrate the embodiments, the present application provides drawings. These drawings are part of the disclosure of the present application, which mainly serve to illustrate the embodiments and can be used to explain the operating principles of the embodiments in conjunction with the related description of the specification. Those of ordinary skill in the art should understand other possible implementations and advantages of the present application in conjunction with reference to these contents. As a flowchart depicts a process or method. Although the flowchart describes each step as a sequential process, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0030] As an embodiment, the optimal collision point search method based on laser points provided by the embodiment of the present application can be executed by a laser point cloud data processing device, which can be realized by software and / or hardware and can be integrated in a laser navigation robot, which can serve as the execution subject of the method. The laser navigation robot can be provided with a laser sensor, which can detect obstacles. The data reflected back from the surface of the object around the body of the robot scanned by the laser beam emitted by the laser sensor forms the point cloud data of the object around the body, which can be identified as obstacles and marked on the map. The point cloud data includes the position information of the surface of the obstacle 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 regarded as a collection of laser points. Laser points are divided by laser frames when constructing the map. A laser frame is a collection of laser points scanned by the laser sensor in 360 degrees, i.e. a frame of point cloud. The data of a laser point represents the position information of the obstacle surface scanned by the laser beam emitted in a detection angle direction of the laser sensor (including the laser distance). In general scenarios, the laser navigation robot can detect whether there are obstacles around it and mark them on the map in real time during indoor movement by the laser sensor provided on the laser navigation robot. At this time, the latest generated laser frame needs to be used. The laser frame includes a plurality of laser points, which can be regarded as a collection of laser points. The laser frame data includes the data of the laser points. When marking the obstacle information on the map, the laser points included in the laser frame need to be used, so as to construct a two-dimensional point cloud model of the surrounding environment of the laser navigation robot based on the SLAM technology. The preconfigured map can be constructed by the laser frame obtained in advance. Hereinafter, the laser navigation robot is referred to as the robot. The preconfigured map is a map that has not been processed by the optimal collision point search method and is a map of the first working area of the robot constructed in advance. The farthest obstacle in the room area where the robot is located can be marked, so that there is a large enough passable area in the first working area of the robot. The area of the first working area of the robot is smaller than the area of the room area where the robot is located. Preferably, the preconfigured map is a rectangular map area, and the length and width of the rectangular map area are adaptively configured according to the size of the actual working environment or adaptively configured according to the distribution characteristics of the obstacles.
[0031] Specifically, the controller inside the robot reads the laser point cloud data or the depth image including the laser point cloud data collected by the laser sensor in real time, constructs a point cloud model to create a point cloud map, projects and converts the point cloud map into a two-dimensional grid map that can be used for navigation, i.e., a preconfigured map, as a two-dimensional point cloud map, reflecting the environmental information detected by the robot in the travel plane, the preconfigured map is regarded as a map image, and the two-dimensional landmark information corresponding to the point cloud position of the preconfigured map (two-dimensional point cloud map) is converted to facilitate related image processing operations in the preconfigured map. In the map coordinate system of the preconfigured map, i.e., the aforementioned two-dimensional grid coordinate system, the origin of the map coordinate system of the preconfigured map can be defined at the driving wheel, the assembly position of the laser sensor, or the center position of the robot body, which is not limited here. In the preconfigured map, the coordinates of each grid are the coordinates of the lower left corner point of the grid, the coordinates of the upper left corner point of the grid, or the coordinates of the lower right corner point of the grid. In some implementation scenarios, the center position of the grid is used to represent the true geographical position of the scanned area, and the coordinates of each grid are represented by the coordinates of the center position of the grid. The coordinates of the related corner points and the center position of the grid can also represent the row number and column number of the grid in the preconfigured map, the horizontal coordinate is equal to the column number, and the vertical coordinate is equal to the row number. In this embodiment, the coordinates of the grid corresponding to the laser point are the coordinates of the laser point converted into the preconfigured map, also known as the map coordinates of the laser point. Accordingly, the grid corresponding to the laser point is understood as the map coordinate point corresponding to the laser point; the coordinates of the grid corresponding to the laser point are directly understood as the map coordinates of the laser point.
[0032] In some embodiments of the preconfigured map, the grids are traversed from left to right, and the column number is gradually increased; the grids are traversed from bottom to top, and the row number is gradually increased. Thus, it is ensured that the path generated by connecting each grid in the preconfigured map is continuous. Preferably, the preconfigured map or the global grid map in which the preconfigured map is located is composed of row cells and column cells, starting from the upper left corner of each cell, the row direction is the y coordinate, and the column direction is the x coordinate. The coordinates of each cell are defined by its row and column positions, and each cell is the grid. A grid corresponding to a laser point is represented by a single cell, then a series of adjacent cells represent a line, and a set of adjacent cells can represent an area. Each cell has a value, which is used to represent category data, such as the type of marked environmental information and the type of obstacle.
[0033] In the embodiment, each laser point collected by the laser sensor of the robot corresponds to a grid in the preconfigured map, which is represented by a pixel point. Each pixel point is represented by a specific size grid, which is each grid in the aforementioned two-dimensional grid map. The pixel point is a unit pixel in the preconfigured map, and the grid is a unit grid in the preconfigured map, so that one laser point corresponds to one grid. Preferably, under the condition that the preconfigured map is configured as a grid map, the robot configures one pixel point as a 5 cm by 5 cm cell as a grid for filling the preconfigured map. At this time, the grid is equivalent to a 5 cm by 5 cm cell, and one laser point corresponds to one grid. Therefore, in the embodiment, for one preconfigured map or a local map in the preconfigured map, one grid also corresponds to one connected domain. The size of the connected domain is the number of connected pixel points, also known as the connectivity number, which can be stored in the corresponding grid. The number of pixel points constituting the connected domain can reflect the size of the obstacle.
[0034] In the along-side navigation scene, the robot generally first controls the robot to search for the nearest wall obstacle, and after navigating to the nearest wall obstacle and colliding with the surface thereof, the robot sets the position of the collision as the along-side starting point. Then, the robot adjusts the advancing direction of the robot from the along-side starting point of the collision, so that the robot starts to perform along-side walking along the wall surface. The robot can also perform along-side walking along the continuous obstacle boundary (four walls in the same room, which are continuous and integrated, and do not belong to isolated obstacles) in a certain area range under the same collision scene. It needs to be supplemented that the wall obstacle includes the obstacle attached to the wall, the wall and the attached object, that is, the invention regards the object attached to the wall as the wall. At this time, the robot collides with an obstacle collision point in the nearest wall obstacle, and the invention needs to search for a most suitable obstacle collision point, and also determine that the obstacle collision point exists in a continuous obstacle suitable for along-side walking of the robot, so as to navigate the robot to the position of the collision with the obstacle collision point or the position of the collision. Then, the robot configures the position as the along-side starting point of the robot before starting to move. In order to start to enter the along-side working mode, the robot preferentially navigates to the along-side starting point of the robot and contacts the most suitable obstacle collision point. Then, the robot starts normal work only after completing the outer contour. However, since the robot can only perceive the environment through the data of the laser points, and the data of the laser frame (one frame of point cloud data, one frame of laser point data or one frame of laser data) only has 360-degree laser point data, the accuracy of identifying the continuous obstacle such as the wall is not high. In addition, the collected laser points are unstable, and one frame of laser data (laser point data) is prone to noise, which causes the wall boundary marked in the preconfigured map to have a gap, or causes the robot to identify the isolated obstacle (obstacle that protrudes and cannot be crossed and pushed) as the wall to make it preferentially walk along the column.
[0035] The embodiment of the present application finds the effective wall position point with the shortest distance from the robot body, i.e., the corresponding wall projection position point on the ground, as the optimal collision point. The basic idea of the optimal collision point searching method includes: the robot searches a grid satisfying a preset connectivity condition in the preconfigured map, and then marks the coordinates of the grid satisfying the preset connectivity condition as the coordinates of the optimal collision point in the preconfigured map, and determines that the physical position reflected by the laser point corresponding to the grid satisfying the preset connectivity condition is the optimal collision point. The preset connectivity condition can be different connectivity conditions for identifying walls and other continuous obstacle boundaries, including the number of pixel points, and the coordinates of the laser point corresponding to the grid satisfying any connectivity condition can be configured as the optimal collision point. The coordinates of the laser point corresponding to the grid are used as the coordinates of the optimal collision point in the actual physical environment, and the coordinates of the laser point corresponding to the grid are used as the coordinates of the optimal collision point in the preconfigured map. It is determined that there is a continuous obstacle at the optimal collision point. The continuous obstacle at the optimal collision point is the largest continuous obstacle searched in the preconfigured map. At the same time, the optimal collision point is the closest position point of the largest continuous obstacle searched. It should be noted that the laser points collected by the robot correspond to the grids in the preconfigured map, and the laser data currently collected by the robot can be converted to the grids of the map constructed by the robot for calculation and processing of the connected grids. However, the neighborhood of the grid corresponding to the laser point can exceed the boundary of the preconfigured map. Alternatively, before the optimal collision point searching method is executed, the laser data currently collected by the robot has been converted to the preconfigured map in real time, and the obstacle information can be marked in an unstable state. Therefore, the embodiment of the present application needs to search for a continuous obstacle such as a wall according to the specific connectivity condition of the landing point of the collected laser points on the map, and then determine the optimal collision point, reduce the probability of the phenomenon that there is no obstacle at the optimal collision point searched, and overcome the misjudgment problem caused by unstable laser data collected by the robot.
[0036] It should be noted that when the robot starts to walk along the edge in the area defined by the preconfigured map, the obstacle to which the optimal collision point belongs is the first obstacle along which the robot walks. At this time, the edge starting point of the robot is not the optimal collision point, but a position point near the optimal collision point which allows the robot to contact the obstacle to which the optimal collision point belongs. At this time, the robot can determine that the first navigation target position can contact the obstacle to which the optimal collision point belongs.
[0037] In an embodiment, after the robot detects the wall in real time, the embodiment is equivalent to projecting the real-time detection data of the wall into the preconfigured map to form a ground area where the wall is located; then the wall is constructed as a two-dimensional plane boundary of the preconfigured map through a region connected component algorithm (Connected Components With Stats), so that the detection data of the wall is converted by the robot into a ground area where the wall is located, which can be understood as a line segment actually detected and belonging to the contour boundary of the wall projected on the ground, that is, the representation of the continuous obstacle disclosed in the embodiment in the preconfigured map can be used as a boundary line of the first working area of the robot.
[0038] It should be noted that the robot starts from any position in the room to find the wall obstacle (continuous obstacle), and when the wall is detected or collides with the wall, the robot is triggered to enter the edge-following working mode, and in the edge-following working mode, the robot adjusts the advancing direction to be parallel to the wall contour line or the boundary line projected on the ground by the wall, that is, the edge-following is realized; at the same time, an edge-following starting point suitable for the robot is set, which is a kind of navigation target point, and the edge-following starting point can also be the position point of the collision between the robot and the obstacle, but it is not the optimal collision point, and can be in the neighborhood of the optimal collision point or within the preset distance range of the optimal collision point, and is not occupied by the obstacle; then the robot walks along the current advancing direction, keeps the current advancing direction parallel to the wall contour line or the boundary line projected on the ground by the wall, that is, realizes the edge-following.
[0039] In addition, the coordinates of the robot at this time and the angle of the robot advancing (the angle of the advancing direction of the robot relative to the X-axis direction of the map coordinate system or the angle of the advancing direction of the robot relative to the Y-axis direction of the map coordinate system) are recorded in the map (which can be equivalent to the preconfigured map) constructed by the robot in real time, and then the edge-following (wall-following) is started from the edge-following starting point while keeping parallel to the wall, wherein the advancing direction of the robot is adjusted to be parallel to the extension direction of the wall.
[0040] As an embodiment, as shown in Figure One The optimal collision point search method based on laser points includes the following steps: S1, obtaining a preconfigured map and obtaining a laser frame; specifically, the robot obtains a preconfigured map which has been marked with obstacle information, and obtains a laser frame currently collected by a laser sensor, including data of a frame of laser points (laser data collected within a valid detection angle range of 360 degrees) so as to process the connected relationship of the data of the laser points included in the laser frame in the preconfigured map. Then step S2 is entered.
[0041] Step S2, judge whether a grid satisfying the first preset connectivity condition is searched in the preconfigured map, if yes, go to step S4, otherwise go to step S3. The preset connectivity condition in the foregoing embodiments includes the first preset connectivity condition or the second preset connectivity condition; in this embodiment, the grid searched by the robot in the preconfigured map can be corresponding to a laser point collected, and the grid corresponding to the laser point can be a seed grid; it should be noted that a laser point falls into a grid corresponding to the preconfigured map, and the coordinates corresponding to the laser point are converted into the coordinates of a grid of the preconfigured map, but a grid can allow multiple laser points to fall into, i.e. under the premise of not being limited to the same laser frame, the coordinates of multiple different laser points can be converted into the coordinates of the same grid; the currently collected laser point does not necessarily fall into the neighborhood grid area of the grid.
[0042] Step S3, judge whether a grid satisfying the second preset connectivity condition is searched in the preconfigured map, if yes, go to step S5, otherwise go to step S6. After the robot judges that no grid satisfying the first preset connectivity condition is searched in the preconfigured map, the robot judges whether a grid satisfying the second preset connectivity condition is searched in the preconfigured map. In this embodiment, the grid satisfying the first preset connectivity condition and the grid satisfying the second preset connectivity condition are applied to different map area ranges; optionally, the map area range applied to the grid satisfying the first preset connectivity condition is smaller than the map area range applied to the grid satisfying the second preset connectivity condition, and the laser points are distributed in different degrees of intensity in the two map area ranges. In some embodiments, when the robot searches a grid satisfying the first preset connectivity condition in the preset range of the grid corresponding to each laser point in the laser frame, step S4 is performed, otherwise step S3 is performed.
[0043] Step S4, mark the coordinates of the grid satisfying the first preset connectivity condition as the coordinates of the optimal collision point in the preconfigured map, i.e. the coordinates of the optimal collision point in the corresponding map coordinate system. After the robot searches the grid satisfying the first preset connectivity condition in the preconfigured map, the coordinates of the grid satisfying the first preset connectivity condition are obtained and configured as the coordinates of the optimal collision point in the coordinate system of the preconfigured map, and correspondingly, 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 laser radar coordinate system).
[0044] Step S5: Mark the coordinates of the grids that satisfy the second 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 second preset connectivity condition in the pre-configured map, it obtains the coordinates of the grids that satisfy the second 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).
[0045] Step S6: Search for the laser point with the smallest laser distance within the laser frame, and then mark the coordinates of the grid corresponding to that laser point as the coordinates of the optimal collision point in the pre-configured map. In step S6, if the robot cannot find a grid that satisfies the first preset connectivity condition, and the robot cannot find a grid that satisfies the second preset connectivity condition, the robot configures the laser point with the smallest laser distance within the currently acquired laser frame as the optimal collision point, and marks the coordinates of that laser point as the coordinates of the optimal collision point in the lidar coordinate system. The laser points corresponding to the grids currently searched by the robot in the pre-configured map all originate from the laser frames currently acquired by the robot; one laser point corresponds to one laser distance.
[0046] The optimal collision point search method described in steps S1 to S6 above obtains the optimal collision point based on the connectivity conditions of the laser point data within the pre-configured map. This method filters out noisy points in the pre-configured map by enumerating laser points, and has a certain adaptability to unstable maps and unstable laser data, thus avoiding situations where there are no obstacles near the position where the robot begins to walk along the edge.
[0047] In the foregoing embodiment, the data reflected back to the laser sensor of the robot from the object surface around the body of the robot scanned by the laser beam emitted by the laser sensor forms a point cloud of the object around the body of the robot, the laser point is used to represent the reflection position of the laser emitted by the laser sensor of the robot on the obstacle, the laser point is derived from the laser frame collected by the robot, the laser frame is a set of laser points scanned by the laser sensor in 360 degrees, that is, a point cloud frame; the optimal collision point is located at a position occupied by a continuous obstacle, such as a boundary point of a wall or a gap position; wherein the laser point is located within the effective detection angle range of the laser sensor and is mapped into the corresponding grid of the preconfigured map, specifically, the laser data is converted from the laser radar coordinate system to the map coordinate system, and the laser distance can be converted into a grid representation. 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 is used to reflect the distance between the detected obstacle and the laser sensor installed on the robot, and the laser distance can be the distance between the reflection position of the obstacle and the center of the body of the robot, which can be adjusted according to the setting mode of the map coordinate system. The origin of the map coordinate system of the preconfigured map can be defined at the driving wheel of the robot, the assembly position of the laser sensor or the center position of the body, which is not limited herein. In the embodiment, the effective detection angle range of the laser sensor is 0-360 degrees, there are 360 laser points in the laser frame, which correspond to 360 different laser distances respectively, and in the corresponding grid space, the laser distance at the unit detection angle of 0 degree is 1 meter, and the laser distance at the unit detection angle of 1 degree is 1.1 meters. Thus, in each unit detection angle of the embodiment, there is one laser point and one laser distance corresponding to the laser frame, and the laser distances of different laser points are not equal. Thus, the laser points with large data quantity and high discreteness collected by the laser sensor can be uniformly converted to the map coordinate of the preconfigured map, so that the data of the discrete laser points obtained can be described in the same coordinate system, and the coordinate information and the number of grids belonging to the same connected domain can be identified and sorted in the same coordinate system.
[0048] On the basis of the above embodiment, the grid satisfying the first preset connectivity condition is: in the preconfigured map, the grid corresponding to the first effective laser point with the largest number of best neighborhood connectivity pixels, the largest number of best neighborhood connectivity pixels and the smallest laser distance. In this embodiment, the source of the grid satisfying the first preset connectivity condition includes the laser points falling into the preconfigured map, taking the grid corresponding to the first effective laser point as the center grid (seed grid), and screening out the largest number of connectivity pixels from the number of connectivity pixels corresponding to each grid in the center grid and its neighborhood grid as the best neighborhood connectivity pixel number of the grid corresponding to the first effective laser point. The comparison of the best neighborhood connectivity pixel number of each first effective laser point falling into (converted to) the preconfigured map can realize the grid corresponding to the first effective laser point with the largest number of best neighborhood connectivity pixels, the largest number of best neighborhood connectivity pixels and the smallest laser distance in the preconfigured map as the grid satisfying the first preset connectivity condition. Optionally, all the grids in the preset range of each first effective laser point grid are not necessarily located in the preconfigured map, the grid corresponding to the first effective laser point is not necessarily in the preconfigured map, and the laser point with the laser distance in the preset detection distance range. Preferably, the preset detection distance range is greater than the body radius of the robot (when the robot is a circular cleaning robot), but less than 1.5 meters, so that the laser points with the laser distance in the preset detection distance range are all first effective laser points. Using the connectivity pixel number of the first effective laser point to search for the grid satisfying the requirement can search for the contour point of the effective continuous obstacle in the area with a larger connectivity area, exclude more interference of the data information of the laser points reflected by the isolated obstacle, reduce the probability of fitting the isolated obstacle line segment with a non-negligible length into a physical wall, and reduce the influence of the contour line segment misjudged as a wall.
[0049] In the embodiment, the preset range of the grid corresponding to the 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 neighborhood grid range of the grid corresponding to the first effective laser point, including the grid corresponding to the first effective laser point; the preset range of the first effective laser point in the embodiment is configured considering that the first effective laser point or the grid corresponding to the first effective laser point may have noise factors, and the grid corresponding to the first effective laser point is taken as the center grid to expand one grid outward in the preset expansion direction, and then searching is performed in the expanded grid area. The best neighborhood connected pixel number of a first effective laser point is the maximum value among the connected pixel numbers of all grids in the overlapping area of the preset range of the grid corresponding to the first effective laser point and the preconfigured map. By enumerating and comparing the connected pixel numbers of each grid in the aforementioned overlapping area, a grid with the maximum connected pixel number can be obtained, and at this time, the connected pixel number with the maximum value in the preset range of the first effective laser point is configured as the best neighborhood connected pixel number of the first effective laser point. Because the best neighborhood connected pixel number is the search result in the expanded grid area with the grid corresponding to the first effective laser point as the center grid, it is beneficial to search out a continuous obstacle with a larger size, such as a wall; and thus the interference of non-continuous obstacles (such as wooden strips, columns and other isolated obstacles that cannot be crossed) is excluded, and the accuracy and intelligent level of the robot in distinguishing a wall from a non-wall obstacle are improved.
[0050] It should be noted that one grid corresponds to one connected pixel number, and in some embodiments, all grids in the preset range of the grid corresponding to the first effective laser point may be interconnected to form an independent connected domain, and thus the connected pixel numbers of all grids in the preset range of the grid corresponding to the first effective laser point are equal.
[0051] It should be noted that one laser point falls into one grid corresponding to the preconfigured map, and the coordinates of the laser point are converted into the coordinates of the grid of the preconfigured map, but one grid can 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 one grid includes the grid itself and the neighborhood grid area, but the neighborhood grid area does not necessarily fall into the corresponding laser point, and only the grid may fall into the laser point in the preset range.
[0052] As an embodiment, as shown in Figure Two the method of searching for a grid satisfying the first preset connected condition in the preconfigured map includes:
[0053] Step S201, whenever searching all the grids in the preset range of the grid corresponding to a first effective laser point, the first effective laser point with the number of connected pixels in the best neighborhood greater than the preset pixel number threshold is marked as the first target laser point; then step S202 is entered. Specifically, in the process of searching the grid in the preset range of the grid corresponding to a first effective laser point, the number of connected pixels of each grid in the preconfigured map is sorted and compared, the maximum number of connected pixels is obtained, and the maximum number of connected pixels is configured as the number of connected pixels in the best neighborhood of the first effective laser point. When the number of connected pixels in the best neighborhood is greater than the preset pixel number threshold, the first effective laser point is marked as the first target laser point. Preferably, the preset pixel number threshold is configured as 16, and the preset range of the grid corresponding to the first effective laser point is the four-neighborhood of the grid corresponding to the first effective laser point, which is beneficial to filter invalid laser data; the number of connected pixels in the best neighborhood of a laser point can reflect the size characteristics of the obstacle where the laser point is located. When the size of the required search obstacle is larger, the continuous contour line of the obstacle is longer, and the number of connected pixels in the best neighborhood corresponding to the laser point is larger, the preset pixel number threshold needs to be configured larger, which can be used to identify walls.
[0054] It should be noted that the number of connected pixels of each grid is obtained in advance and stored in the associated index address inside the robot according to the coordinate information of the grid in the preconfigured map. The coordinate offset of the grid relative to the origin of the map coordinate system is associated with the index address. In some embodiments, the longitudinal coordinate offset of the grid relative to the origin is multiplied by the length of the preconfigured map in the horizontal direction and then the horizontal coordinate offset of the grid relative to the origin is added 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 the index address.
[0055] Specifically, in step S201, after searching the grid with the maximum number of connected pixels in the preset range of the grid corresponding to the first effective laser point in the preconfigured map, if it is judged that the number of connected pixels of the grid is greater than the preset pixel number threshold, 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 neighborhood 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 and the number of connected pixels in the best neighborhood of the first target laser point are recorded, which is convenient for comparing with the subsequent search of the same type of information to obtain the number of connected pixels in the best neighborhood with larger value, and to realize accurate identification of continuous obstacles.
[0056] Step S202, after searching all the grids in the preset range of each first effective laser point corresponding grid, it is determined whether there is only one first two target laser points, yes, then enter step S203, otherwise enter step S204. In this embodiment, the robot first obtains the first two target laser points after completing the enumeration and comparison of the number of connected pixels of each grid in the preset range of each first effective laser point corresponding grid. At this point, the robot completes the traversal of all laser points falling within the preset detection distance range, and completes the search of all grids or adjacent grids within the preset detection distance range, that is, the search of the number of connected pixels of the grid within the effective detection distance greater than one body radius and less than 1.5 meters or other restricted effective detection distance.
[0057] It should be noted that, after searching all the grids in the preset range of the first effective laser point corresponding grid within the area defined by the preconfigured map, the first one target laser point with the maximum number of connected pixels is marked as the first two target laser point. The first two target laser points are the first one target laser points with the maximum number of adjacent connected pixels within the preconfigured map.
[0058] Step S203, it is determined that only one first two target laser points are detected, then the grid corresponding to the first two target laser points is marked as the grid satisfying the first preset connected condition, and the coordinates of the grid corresponding to the first two target laser points are marked as the coordinates of the optimal collision point within the preconfigured map. It is determined that the physical position point where the first two target laser points are located is the optimal collision point, and it is determined that the grid corresponding to the first two target laser points is occupied by the continuous obstacle, that is, the robot recognizes the wall type continuous obstacle for the robot to perform edge walking.
[0059] Step S204, it is determined that at least two first two target laser points are detected, then the grid corresponding to the first two target laser points with the minimum laser distance is marked as the grid satisfying the first preset connected condition, and the coordinates of the grid corresponding to the first two target laser points with the minimum laser distance are marked as the coordinates of the optimal collision point within the preconfigured map. It is determined that the physical position where the first two target laser points are located is the optimal collision point, and it is determined that the grid corresponding to the first two target laser points is occupied by the continuous obstacle, that is, the robot recognizes the wall type continuous obstacle for the robot to perform edge walking.
[0060] In summary, steps S201 to S204 search for a grid satisfying the first preset connectivity condition in a preset range of the grid corresponding to the laser point with limited distribution range, and then mark the coordinates of the grid satisfying the first preset connectivity condition as the coordinates of the optimal collision point, so as to search for the boundary point of the effective continuous obstacle in the area close to the robot body, that is, to obtain the grid satisfying the first preset connectivity condition by searching for the maximum number of connected pixels, and to take the laser point corresponding to the grid as the optimal collision point, so as to search for the grid corresponding to the optimal collision point in the grid area with large connectivity area by enumerating the laser points in the small map area. Subsequently, the robot starts to walk along the edge after contacting the obstacle at the optimal collision point, specifically, to walk along the contour edge of the contacted obstacle, and the advancing direction is parallel to the contour line of the obstacle.
[0061] It should be noted 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 the obstacle boundaries with continuity in a certain area range, which usually includes multiple boundary points, rather than only one boundary point. For example, the gap can be a door hole of a room, and the obstacles on both sides of the door hole are the four walls in the same room, which are continuous and integrated, and do not belong to isolated obstacles. Therefore, the embodiment can distinguish the wall obstacle and the obstacle of isolated island (obstacle that is protruding, cannot be crossed and cannot be pushed) by the foregoing steps S201 to S204, and overcome the problem that the robot cannot accurately identify the wall by only using the laser data contained in the laser frame, such as avoiding to judge the position point closest to the robot in a wooden strip as the optimal collision point by approaching the wooden strip, so that the robot walks along the edge of the wooden strip.
[0062] On the basis of the above-mentioned embodiments, after searching all the grids in the preset range of each first valid laser point corresponding grid, if no grid with the number of connected pixels greater than the preset pixel number threshold is searched in the preconfigured map, it is determined that no grid satisfying the first preset connected condition is searched in the preconfigured map, and then the robot is switched from performing step S2 to performing step S3 to start searching the grid satisfying the second preset connected condition in the preconfigured map, so as to search the grid satisfying the second preset connected condition in the grid corresponding to the laser point in the new range area. Correspondingly, in the preconfigured map, when no grid with the number of connected pixels greater than the preset pixel number threshold is searched in all the grids in the preset range of each first valid laser point corresponding grid, it is determined that the first valid laser point corresponding grid cannot be marked as the grid satisfying the first preset connected condition. The number of connected pixels of each grid in the preset range of the first valid laser point corresponding grid searched by the robot is relatively small, which is insufficient to describe the continuous type of obstacles such as walls. It should be noted that the number of connected pixels is used to reflect the size of the obstacle so that the grid satisfying the first preset connected condition or the grid satisfying the second preset connected condition is configured as the grid occupied by the continuous type of obstacle.
[0063] As an embodiment, the grid satisfying the second preset connectivity condition is: in the preconfigured map, the grid corresponding to the second effective laser point with the largest number of connected pixels in the neighborhood and the smallest laser distance. In this embodiment, the robot takes the grid corresponding to the second effective laser point as the center grid (seed grid) among the laser points falling in the preconfigured map, filters out the largest number of connected pixels in the center grid and each grid in the neighborhood of the center grid from the number of connected pixels corresponding to each grid, as the optimal neighborhood connected pixel number of the grid corresponding to the second effective laser point, and further filters out the grid corresponding to the second effective laser point with the largest number of connected pixels in the neighborhood and the smallest laser distance, as the grid satisfying the second preset connectivity condition. Compared with the grid satisfying the first preset connectivity condition, the grid does not pursue the largest number of connected pixels in the neighborhood, reduces the requirement for the continuity of the obstacle contour line, and instead pursues the nearest laser point. At this time, the distribution density of the laser points falling in the searched map area is higher. Optionally, the grids in the preset range of each grid corresponding to the second effective laser point do not necessarily fall in the preconfigured map, and the preset range of each grid corresponding to the second effective laser point covers the grid corresponding to the second effective laser point. The second effective laser point is the laser point associated with the laser distance and the body size of the robot. Preferably, the laser distance is greater than the body radius of the robot (when the robot is a circular cleaning robot), so as to avoid the laser sensor of the robot colliding with the obstacle during scanning and detection. Therefore, the distribution range of the second effective laser point in the preconfigured map is greater than the distribution range of the first effective laser point in the preconfigured map, and the number of the second effective laser points falling in or converted to the preconfigured map is greater than the number of the first effective laser points. In this embodiment, the robot uses the connected pixel number of the second effective laser point to search for the grid satisfying the requirement, can search for the effective continuous obstacle boundary in a relatively close distance range, excludes the interference of the data information of the laser point reflected by the isolated obstacle at a close distance, reduces the phenomenon of the obstacle contour line segment around the body being misjudged as a wall. Therefore, the grid satisfying the second preset connectivity condition is searched in the grid area with a relatively dense distribution of laser points (a large number of second effective laser points are searched) in a large map area.
[0064] In the embodiment, the preset range of the grid corresponding to the second effective laser point covers the grid corresponding to the second effective laser point, specifically, the preset range of the grid corresponding to the second effective laser point is the neighborhood grid range of the grid corresponding to the second effective laser point, and includes the grid corresponding to the second effective laser point. In the embodiment, the preset range of the second effective laser point is configured considering that the second effective laser point or the grid corresponding to the second effective laser point may have noise factors, and the grid corresponding to the second effective laser point is taken as a center grid to expand one grid outward in a preset expansion direction, and then searching is performed in the expanded grid area. The optimal neighborhood connected pixel number of the second effective laser point is the maximum value among the connected pixel numbers of all the grids in the overlapping area of the preset range of the grid corresponding to the second effective laser point and the preconfigured map. By enumerating and comparing the connected pixel numbers of each grid in the preset range of the grid corresponding to the second effective laser point, a grid with the maximum connected pixel number can be obtained, and at this time, the connected pixel number with the maximum value in the preset range of the second effective laser point is configured as the optimal neighborhood connected pixel number of the second effective laser point. Because the optimal neighborhood connected pixel number is the search result in the expanded grid area with the grid corresponding to the second effective laser point as the center grid, the interference of the non-continuous obstacle (a wooden strip, a column, and other isolated non-crossable protruding obstacles) contour line in the area close to the body of the robot is excluded, the accuracy and intelligent level of the robot in distinguishing the close wall and non-wall obstacles are improved, and the speed of the robot in starting to perform the edge walking is accelerated.
[0065] As an embodiment, as shown in Figure Three The method for searching the grid satisfying the second preset connected condition in the preconfigured map includes:
[0066] In step S301, when all the grids in the preset range of the grid corresponding to the second effective laser point are searched, the second effective laser point corresponding to the grid with the optimal neighborhood connected pixel number greater than the preset pixel number threshold is detected, and the second effective laser point corresponding to the grid with the optimal neighborhood connected pixel number greater than the preset pixel number threshold is detected. The second effective laser point is marked as a second target laser point, and then step S302 is entered.
[0067] Specifically, in the process of searching the grid in the preset range of the second effective laser point corresponding grid, the robot enumerates and compares the number of connected pixels of each associated grid in the preconfigured map, obtains the maximum number of connected pixels, and configures the maximum number of connected pixels as the optimal neighborhood connected pixel number of the second effective laser point. When the optimal neighborhood connected pixel number is greater than the preset pixel number threshold, the second effective laser point is marked as the second target laser point. Preferably, the preset pixel number threshold is configured as 16, and the preset range of the grid corresponding to the second effective laser point is the four-neighborhood of the grid corresponding to the second effective laser point, which is beneficial to filter invalid laser data in the nearby area; the optimal neighborhood connected pixel number of a laser point can reflect the size feature of the obstacle where the laser point is located. When the obstacle to be searched is larger, the continuous level profile of the obstacle is longer, and the corresponding optimal neighborhood connected pixel number is larger, the preset pixel number threshold needs to be configured to be larger, such as identifying a wall.
[0068] Specifically, in the step S301, when the grid with the maximum number of connected pixels is searched in the preset range of the grid corresponding to the second effective laser point, if it is judged that the number of connected pixels of the grid is greater than the preset pixel number threshold, the second effective laser point is marked as the second target laser point, and the number of connected pixels of the grid is marked as the optimal neighborhood connected pixel number corresponding to the second target laser point. The laser distance of the second effective laser point is marked as the laser distance of the second target laser point, and the laser distance of the first target laser point is recorded, which is convenient for comparison with the same type of information searched subsequently, obtaining a smaller value of the laser distance, and realizing accurate identification of a continuous obstacle at a closer distance.
[0069] Step S302, when searching all grids in the preset range of the grid corresponding to each second effective laser point, the grid corresponding to the second target laser point with the smallest laser distance is marked as the grid satisfying the second preset connected condition, and the coordinates of the grid corresponding to the second target laser point are marked as the coordinates of the optimal collision point in the preconfigured map. It is determined that the physical position of the second target laser point is the optimal collision point, and it is determined that the continuous obstacle exists at the grid corresponding to the second target laser point, such as identifying the position point in the wall surface closer to the robot, which is represented as the optimal collision point. Then the robot can navigate to the optimal collision point at a shorter distance, and then start to walk along the continuous obstacle.
[0070] In the embodiment, the robot obtains the second target laser point with the minimum laser distance after comparing the laser distances of the second target laser points in the preset range of the grid corresponding to each second effective laser point. Since the laser distance of each laser point in the laser frame is different, the laser frame falls into the laser points of the preset map, and the laser point with the minimum laser distance is only one, so the robot obtains one second target laser point with the minimum laser distance. Thus, the robot completes the traversal of all second effective laser points falling within the preset detection distance range, and completes the search of all grids in the range greater than the body radius of the robot, and realizes the comparison of the laser distances in the distance range greater than one body radius. Therefore, on the basis that no grid satisfying the first preset connectivity condition is searched in the preset range of the grid corresponding to the laser point with a small distribution range, a grid satisfying the second preset connectivity condition is searched in the preset range of the grid corresponding to the laser point with a large distribution range. Then, the coordinates of the grid satisfying the second preset connectivity condition are marked as the coordinates of the optimal collision point.
[0071] On the basis of the above embodiment, after searching all grids in the preset range of the grid corresponding to each second effective laser point, if no grid with the number of connected pixels greater than the preset pixel number threshold is searched in the preset map, it is determined that no grid satisfying the second preset connectivity condition is searched in the preset map. Then, the robot executes step S6 instead of step S3, searches for the laser point with the minimum laser distance in the grid corresponding to all laser points in the current collected laser frame, marks the coordinates of the grid corresponding to the laser point as the coordinates of the optimal collision point in the preset map, determines that the physical position of the laser point is the optimal collision point, and determines that the continuous obstacle exists in the grid corresponding to the laser point. Accordingly, when no grid satisfying the first preset connectivity condition is searched in the preset map, and no grid satisfying the second preset connectivity condition is searched in the preset map, the robot searches for the laser point according to each unit detection angle in the effective detection angle range, traverses and compares the laser distances of each laser point, obtains the laser point with the minimum laser distance, marks the laser point with the minimum laser distance as the optimal collision point, and marks the coordinates of the grid corresponding to the laser point with the minimum laser distance as the coordinates of the grid corresponding to the optimal collision point. Thus, the robot obtains an optimal collision point at the nearest wall surface without determining the connected grid.
[0072] In conclusion, the application can obtain an optimal collision point in the closest continuous obstacle to the robot body, overcome the problem of unstable laser data (including the coordinates of laser points, detection angle and laser distance) or noise resulting in unstable results in the prior art, filter noise information in the image area corresponding to the preconfigured map, reduce the probability of selecting a position on the profile of an isolated obstacle as the optimal collision point, and also reduce the probability of selecting a position where there is no obstacle in the actual physical environment as the optimal collision point. The robot navigates to contact the obstacle at the optimal collision point and then starts to walk along the edge, specifically walking along the profile edge of the contacted obstacle, with the forward direction parallel to the profile line of the obstacle, thereby enhancing the environmental adaptability of the robot walking along the edge.
[0073] As an embodiment, the source of the coordinates of the grid corresponding to the laser point includes: in the preconfigured map, the coordinate offset amount including the horizontal axis coordinate offset amount and the vertical axis coordinate offset amount is obtained by the trigonometric function conversion result of the laser distance of the laser point; optionally, the horizontal axis coordinate offset amount in the trigonometric function conversion result of the laser distance of the laser point 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 amount is obtained by adding the sine function value of the laser distance of the laser point to a reference vertical coordinate; the laser distance of the laser point is converted into coordinates. Then, the laser point is controlled to offset coordinates according to the horizontal axis coordinate offset amount and the vertical axis coordinate offset amount, that is, the coordinates of the laser point in the laser radar coordinate system are controlled to perform coordinate offset calculation according to the horizontal axis coordinate offset amount and the vertical axis coordinate offset amount; and the coordinates of the laser point after coordinate offset are converted into grid coordinates according to a preset ratio, the grid coordinates being integer grid numbers, so as to convert the laser point into the coordinate system of the preconfigured map, and further realize grid processing of the laser point in a unified coordinate system, so that the discrete point cloud data obtained by the robot can be described in the same map coordinate system.
[0074] In some embodiments, the coordinate axis directions of the coordinate systems before and after the conversion need to be considered in the process of the aforementioned coordinate offset calculation; generally, the coordinate offset calculation manner is related to the direction of the horizontal coordinate axis of the two coordinate systems before and after the conversion, when the positive directions of the horizontal coordinate axes of the two coordinate systems before and after the conversion are the same, the horizontal coordinate of the laser point in the laser radar coordinate system is controlled to subtract 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 controlled to subtract the horizontal coordinate of the laser point in the laser radar coordinate system, to obtain the horizontal coordinate of the laser point after the coordinate offset. Similarly, the coordinate offset calculation manner is related to the direction of the vertical coordinate axis of the two coordinate systems before and after the conversion, when the positive directions of the vertical coordinate axes of the two coordinate systems before and after the conversion are the same, the vertical coordinate of the laser point in the laser radar coordinate system is controlled to subtract 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 controlled to subtract the vertical coordinate of the laser point in the laser radar coordinate system, to obtain the vertical coordinate of the laser point after the coordinate offset.
[0075] In some embodiments, the laser distance of the laser point changes with the detection angle where the laser point is located, the detection angle where the laser point is located is within the effective detection angle range of the laser sensor, wherein each laser point falls into 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, 360 laser points are obtained in the laser frame, respectively corresponding to 360 different laser distances, when the unit detection angle is 1 degree, 360 regions are divided, and each laser point in the laser frame falls into a region; for the laser frame, the laser distances of the laser points in each region are different, and each region belongs to a grid region. Wherein, the effective detection angle range includes a plurality of unit detection angles, and the number of unit detection angles existing in an effective detection angle range is equal to the number of laser points included in a frame of point cloud (laser frame).
[0076] In the foregoing embodiment, the preset range of the grid corresponding to the laser point is a neighborhood grid range of the grid corresponding to the laser point, including the grid corresponding to the laser point, wherein the laser point includes the first effective laser point and the second effective laser point. The neighborhood grid range of the grid corresponding to the laser point includes but is not limited to a 4-neighborhood, an 8-neighborhood, a 12-neighborhood or a circular region, etc. with the grid corresponding to the laser point as a center grid, and these neighborhoods can be represented by grids. In the embodiment, the preset range is set considering that the collected laser points may have noise factors, and a neighborhood grid is expanded outward from the center grid corresponding to the laser point in a preset expansion direction, and then a search is performed in the expanded grid area, so as to reduce errors caused by noise factors carried by the center grid, and at the same time, the continuous obstacle can be more easily searched in the expanded grid area, which is also a result of considering the connectivity of the area.
[0077] Preferably, the preset range of the grid corresponding to the laser point is a 4-neighborhood of the grid corresponding to the laser point, including the grid corresponding to the laser point and adjacent grids above, below, left and right of the grid corresponding to the laser point. Compared with an 8-neighborhood grid area or a circular region, the number of searched grids is smaller, and thus the amount of coordinate calculation is reduced.
[0078] In some embodiments, each grid corresponding to a laser point is represented by a pixel point in the preconfigured map, and each pixel point is represented by a grid with a specific size, so that one laser point corresponds to one grid. Preferably, the preconfigured map configures pixel points as grids, and configures one pixel point as a 5 cm by 5 cm cell as a grid filling the preconfigured map, so that one laser point corresponds to one grid, but one grid also corresponds to one connected domain, and the size of the connected domain is the number of connected pixel points. The number of pixel points constituting the connected domain can reflect the size of the obstacle.
[0079] In some embodiments, the preconfigured map is an image of a specific size mapped by laser points collected by a laser sensor of the robot, and each pixel point is an element composed of pixels, and each pixel point can be regarded as a grid (a unit grid of a specific size); wherein, in the preconfigured map, each obstacle is composed of pixel points with the same pixel value and adjacent to each other, so that each obstacle in the preconfigured map is combined by adjacent grids, and specifically, the preconfigured map is processed by using the connected component analysis disclosed in the prior art, so that the obstacles at different positions can be marked as being composed of pixel points with different pixel values, and the obstacles at different positions are composed of pixel points with different colors, for example, in an indoor environment where the robot works, when the obstacle boundaries on both sides of the left and right end points of a gap are not connected, the obstacle boundaries on both sides of the left and right end points of the gap are marked as pixel points with different colors; wherein, the obstacle boundary on the left side of the left end point of the gap is composed of pixel points of a blue connected region, and is composed of 46 connected pixel points, so that the connected pixel number of any pixel point in the blue connected region is 46; the obstacle boundary on the right side of the right end point of the gap is composed of pixel points of a green connected region, and is composed of 92 connected pixel points, so that the connected pixel number of any pixel point in the green connected region is 92. The obstacle boundaries on both sides of the left and right end points of the gap refer to the obstacle boundaries with continuity in a certain range, for example, the gap can be a door opening of a room, and the obstacles on both sides of the door opening are the four walls in the same room, which are continuous and integral and do not belong to isolated obstacles, so the obstacles on both sides of the left and right end points of the gap are marked as pixel points with the same color, and at this time, the obtained connected pixel number is larger.
[0080] In some embodiments, the preset pixel number threshold is a judgment threshold in the preconfigured map for representing the number of adjacent grids of a continuous obstacle, so that when it is judged that the connected pixel number of a corresponding grid is greater than the preset pixel number threshold, the robot identifies the position of the corresponding grid as existing a continuous obstacle, or the connected pixel number of the corresponding grid greater than the preset pixel number threshold is determined as one of the necessary technical features of the corresponding grid existing a continuous obstacle. It is beneficial to search for the grid with a larger connected pixel number and the obstacle composed of the connected grids.
[0081] It should be noted that the connected pixel number of a grid is the number of grids contained in the connected domain where the grid is located, so that a grid corresponding to a laser point corresponds to a connected domain; wherein, the connected domain is an image region composed of pixel points with the same pixel value and adjacent positions, when each grid corresponding to a laser point is represented by a pixel point in the preconfigured map in the embodiment, the connected domain is a grid set composed of adjacent grids with the same pixel value; and each grid or each pixel point in the same connected domain has the same connected pixel number.
[0082] As for the connected component analysis (Connected Component Labeling), it refers to finding and marking each connected region in the image to which the preconfigured map belongs, so as to mark the obstacles occupied by each position. Generally, in the process of connected component analysis, a foreground pixel point is first selected as a seed, then the foreground pixels adjacent to the seed are merged into the same pixel set according to the two basic conditions of the connected region (the same pixel value and adjacent position), and finally the pixel set obtained is a connected region. In the preconfigured map applied in the embodiment, the relevant connected condition is that the target grid which has adjacent position and equal pixel value with the seed grid in the neighborhood grid region of the seed grid can be connected, and the neighborhood grid region of the seed grid can be the range of the upper, lower, left and right adjacent grids of the seed grid, that is, when any one of the upper, lower, left and 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, the grid with the new label value is configured as a connected grid, it is judged whether the neighborhood grid region of the connected grid contains a target grid with equal pixel value, if yes, the connection is continued, and when there is no target grid with equal pixel value in the neighborhood grid region of the final connected grid, that is, the grids in the neighborhood grid region of the final connected grid are all non-target grids, the connection is ended, then a connected domain corresponding to the point cloud data contained by the target grid in the current connection process can be obtained, and the number of connected grids counted at this time is the connected pixel number of the connected domain, which is also the connected pixel number of any grid in the connected domain.
[0083] On the basis of the foregoing embodiment, the number of connected pixels of at least one grid in the preset range of the grid corresponding to a laser point matches a preset number of connected pixels, including 0, wherein each number of connected pixels represents a connected domain, and further represents a clustering result of the laser point; among all the grids in the preset range of the grid corresponding to a laser point, there is a grid with the maximum number of connected pixels, so that the number of connected pixels of the grid is configured as the best neighborhood connected pixel number of the first effective laser point or the best neighborhood connected pixel number of the second effective laser point.
[0084] Thus, the embodiment enumerates each laser point of the laser frame, judges the landing point of the laser point on the map, calculates the final edge following start point according to whether the landing point is an obstacle or not, and enumerates the laser points to effectively filter the noise points on the map, so as to avoid that the robot has no obstacle to follow the edge near the edge following start point. In summary, the robot can obtain the optimal collision point according to the connectivity of the laser point in the laser frame in the corresponding grid of the preconfigured map. When a larger obstacle is found and the laser distance is the smallest, such as a closer wall, the optimal collision point corresponding to the grid or pixel point in the preconfigured map can be determined.
[0085] As an embodiment related to the preconfigured map, before searching for the grid satisfying the preset connectivity condition in the preconfigured map, the robot performs a closing operation on the preconfigured map before performing the foregoing step S1, so that the contour line of the marked obstacle in the preconfigured map is completely described. The closing operation is used to connect the connected domain, so as to screen out the accurate grid position corresponding to the newly collected laser point, which belongs to the repair of the marked pixel point in the preconfigured map in the image morphology sense, and in particular, the smoothing processing of the marked obstacle contour boundary line. Thus, the accuracy of the map information obtained in the subsequently performed step S1, and the grid information participating in the judgment in steps S2 and S3 is improved, and the influence of the noise information carried in the laser frame obtained in step S1 is reduced.
[0086] It should be noted that the preconfigured map is a specific size image constructed by the robot to describe the position characteristics of the laser point, so as to adapt to the actual obstacle distribution characteristics, and is also a map constructed by the robot according to the previously collected laser frame before the robot obtains the current laser frame in step S1. The area defined by the preconfigured map can be a square area of 4m*4m.
[0087] Specifically, the closing operation includes: after a specific size of a map image region in a map previously constructed by the robot is binarized, a binarized map is obtained; then, the binarized map is subjected to image dilation processing, and the binarized map subjected to the image dilation processing is subjected to image erosion processing, so that part of pixel points representing non-obstacles are configured as pixel points representing obstacles, to fill in the gap in the contour line of the obstacle in the binarized map which has not been subjected to the image dilation processing and the image erosion processing; wherein, in the binarized map, the pixel value of the pixel point representing the obstacle and the pixel value of the pixel point representing the non-obstacle are different, generally, the pixel point with a pixel value of 255 is configured to constitute the obstacle, and the pixel point with a pixel value of 0 is configured to constitute the non-obstacle. Due to the binarized map, the same obstacle originally connected together can be divided into multiple segments, and the reason can be that the map previously constructed by the robot is unstable, or the laser data is unstable, so that the map cannot reflect the actual situation; then, the embodiment repairs the missing part between the same obstacles through the foregoing closing operation.
[0088] The logic and / or steps represented in flow diagrams or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logic functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- based system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions, or a combination of these. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electrical apparatus), a portable computer diskette (magnetic apparatus), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber (optical apparatus), and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by electronic
[0089] In the above embodiments, the robot capable of performing the sweeping task (referred to as a sweeping robot for short) is taken as an example to illustrate the technical solutions of the present application, but the present application is not limited to the sweeping robot. The robot in each embodiment of the present application refers to any mechanical device capable of highly autonomously moving in the environment where the robot is located, for example, can be a sweeping robot, a companion robot or a guide robot, etc., or can be a purifier, an unmanned vehicle, etc. Of course, for different robot forms, the work tasks performed by the robots will also be different, and this is not limited.
[0090] Another embodiment of the present application also discloses a chip, which is internally provided with a control program for controlling the mobile robot to perform the optimal collision point searching method described in the above embodiments. The chip marks a grid corresponding to an optimal collision point in the preconfigured map, overcomes the problem that the laser data (including the coordinates of the laser points, the detection angle and the laser distance) is unstable or noisy in the prior art, filters the noise information in the image area corresponding to the preconfigured map, reduces the probability of selecting a position at the contour of an isolated obstacle as an obstacle collision point, and also reduces the probability of selecting a position where there is no obstacle in the actual physical environment as an obstacle collision point, thereby enhancing the environmental adaptability of the coordinates of the optimal collision point.
[0091] It should be understood that the optimal collision point searching method described herein corresponds to an embodiment that can be realized by hardware, software, firmware, middleware, microcode or any combination thereof. For a hardware implementation, the processing unit can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof. When the embodiments are implemented in software, firmware, middleware or microcode, program code or code segments, they can be stored in a machine-readable medium such as a storage component.
[0092] Another embodiment of the present application also discloses a robot, which is equipped with a laser sensor supporting 360-degree detection, and internally provided with the chip described in the above embodiments for controlling the robot to obtain an optimal collision point in a continuous obstacle closest to the robot body, and then controlling the robot to navigate to the optimal collision point to start wall-following along the wall obstacle to which the optimal collision point belongs. Generally, according to the implementation requirements of the wall-following navigation, the robot can be equipped with multiple laser radars arranged at different positions to achieve the purpose of obtaining the obstacle point cloud data around the robot body. Among them, the laser sensor supports real-time scanning and constructing a laser map, and storing the laser map into the chip internally provided in the robot.
[0093] The above examples are only for illustrating the technical concept and characteristics of the present application, and the purpose is to enable the skilled in the art to understand the content of the present application and to implement it, and cannot limit the protection scope of the present application. Any equivalent transformation or modification made according to the spirit and essence of the present application shall be covered within the protection scope of the present application.
Claims
1. A method for searching for an optimal collision point based on a laser point, characterized by, The optimal collision point searching method comprises: searching for a grid satisfying a preset connectivity condition in a preconfigured map, and marking the coordinates of the grid satisfying the preset connectivity condition as the coordinates of the optimal collision point in the preconfigured map, and determining that the physical position reflected by the laser point corresponding to the grid satisfying the preset connectivity condition is the optimal collision point; wherein the preset connectivity condition comprises a first preset connectivity condition or a second preset connectivity condition; the grid satisfying the first preset connectivity condition is a first effective laser point corresponding to a grid in the preconfigured map, wherein the number of best neighborhood connected pixels is greater than a preset pixel number threshold, the number of best neighborhood connected pixels is the maximum, and the laser distance is the minimum; the grid satisfying the second preset connectivity condition is a second effective laser point corresponding to a grid in the preconfigured map, wherein the number of best neighborhood connected pixels is greater than a preset pixel number threshold, and the laser distance is the minimum; the second effective laser point is a laser point whose laser distance is associated with the size of the robot body.
2. The optimal impact point search method of claim 1, wherein, The method for searching for a grid satisfying a preset connectivity condition in a preconfigured map, and marking the coordinates of the grid satisfying the preset connectivity condition as the coordinates of the optimal collision point in the preconfigured map, comprises: when a grid satisfying the first preset connectivity condition is searched in the preconfigured map, the coordinates of the grid satisfying the first preset connectivity condition are marked as the coordinates of the optimal collision point in the preconfigured map; after a grid satisfying the first preset connectivity condition is not searched in the preconfigured map, a grid satisfying the second preset connectivity condition is searched in the preconfigured map, and the coordinates of the grid satisfying the second preset connectivity condition are marked as the coordinates of the optimal collision point in the preconfigured map.
3. The optimal impact point search method of claim 2, wherein, when a grid satisfying the first preset connectivity condition is not searched, and a grid satisfying the second preset connectivity condition is not searched, a laser point with the minimum laser distance is searched in the laser frame, and the coordinates of the grid corresponding to the laser point are marked as the coordinates of the optimal collision point in the preconfigured map; wherein the laser points searched by the robot are all derived from the laser frames collected by the robot; one laser point corresponds to one laser distance.
4. The optimal impact point search method of claim 2, wherein, The laser point is used to represent the reflection position of the laser emitted by the laser sensor of the robot on the obstacle, and the laser point is derived 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 into the corresponding grid of the preconfigured 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, and the laser distance is used to reflect the distance between the detected obstacle and the laser sensor installed on the robot.
5. The optimal impact point search method of claim 4, wherein, 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 number of best neighborhood connected pixels of a first effective laser point is the maximum value among the numbers of connected pixels of all grids in the overlapping area between the preset range of the grid corresponding to the first effective laser point and the preconfigured map; one grid corresponds to one number of connected pixels.
6. The optimal impact point search method of claim 5, wherein, The method for searching the grid satisfying the first preset connectivity condition in the preconfigured map comprises: When all the grids in the preset range of the grid corresponding to each first effective laser point are searched, if it is judged that there are only one first second target laser point, the grid corresponding to the first second target laser point is marked as the grid satisfying the first preset connectivity condition, the coordinates of the grid corresponding to the first second target laser point are marked as the coordinates of the optimal collision point in the preconfigured map, and the physical position point where the first second target laser point is located is determined as the optimal collision point; When all the grids in the preset range of the grid corresponding to each first effective laser point are searched, if it is judged that there are at least two first second target laser points, the grid corresponding to the first second target laser point with the minimum laser distance is marked as the grid satisfying the first preset connectivity condition, the coordinates of the grid corresponding to the first second target laser point with the minimum laser distance are marked as the coordinates of the optimal collision point in the preconfigured map, and the physical position point where the first second target laser point is located is determined as the optimal collision point. The first second target laser point is the first first target laser point with the maximum number of best neighborhood connectivity pixels in the preconfigured map. After all the grids in the preset range of the grid corresponding to each first effective laser point are searched, if no grid with the number of connectivity pixels greater than the preset pixel number threshold is searched in the preconfigured map, it is determined that no grid satisfying the first preset connectivity condition is searched in the preconfigured map, and then the search for the grid satisfying the second preset connectivity condition in the preconfigured map is started.
7. The optimal impact point search method of claim 6, wherein, The number of connectivity pixels is used to reflect the size of the obstacle, so that the grid satisfying the first preset connectivity condition or the grid satisfying the second preset connectivity condition is configured as the grid occupied by the continuous obstacle. The preset range of the grid corresponding to one second effective laser point covers the grid corresponding to the second effective laser point.
8. The optimal impact point search method of claim 7, wherein, The number of best neighborhood connectivity pixels of one second effective laser point is the maximum value among the numbers of connectivity pixels of all the grids in the overlapping area between the preset range of the grid corresponding to the second effective laser point and the preconfigured map. The distribution range of the second effective laser point in the preconfigured map is greater than the distribution range of the first effective laser point in the preconfigured map. The method for searching the grid satisfying the second preset connectivity condition in the preconfigured map comprises:
9. The optimal impact point search method of claim 8, wherein, When all the grids in the preset range of the grid corresponding to each second effective laser point are searched, the second effective laser point with the number of best neighborhood connectivity pixels greater than the preset pixel number threshold is detected, and the second effective laser point is marked as the second first target laser point. When searching all the grids in the preset range of each second effective laser point, the grid corresponding to the second target laser point with the smallest laser distance is marked as a grid satisfying the second preset connectivity condition, and the coordinates of the grid corresponding to the second target laser point are marked as the coordinates of the optimal collision point in the preconfigured map, and it is determined that the physical position where the second target laser point is located is the optimal collision point.
10. The optimal impact point search method of claim 9, wherein, When searching all the grids in the preset range of each second effective laser point, if no grid with a number of connected pixels greater than the preset pixel number threshold is found in the preconfigured map, it is determined that no grid satisfying the second preset connectivity condition is found in the preconfigured map, then the laser point with the smallest laser distance is searched in the laser frame, and the coordinates of the grid corresponding to the laser point are marked as the coordinates of the optimal collision point in the preconfigured map, and it is determined that the physical position where the laser point is located is the optimal collision point.
11. The optimal impact point search method of claim 4, wherein, The source of the coordinates of the grid corresponding to the laser point includes: taking the trigonometric function conversion result of the laser distance of the laser point as a coordinate offset, performing coordinate offset on the laser point, and 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 preconfigured map.
12. The optimal impact point search method of claim 11, wherein, The effective detection angle range of the laser sensor is 0 degrees to 360 degrees, and there are 360 laser points in the laser frame, which correspond to 360 different laser distances respectively. The laser distance of the laser point changes with the unit detection angle where the laser point is located, and the unit detection angle where the laser point is located is within the effective detection angle range of the laser sensor.
13. The optimal impact point search method according to claim 5 or 8, wherein The preset range of the grid corresponding to the laser point is the neighborhood grid range of the grid corresponding to the laser point, and includes the grid corresponding to the laser point.
14. The optimal impact point search method of claim 13, wherein, The preset range of the grid corresponding to the laser point is the four neighborhoods of the grid corresponding to the laser point, and includes the adjacent grids above, below, left and right of the grid corresponding to the laser point, so as to reduce the calculation amount of coordinates.
15. The optimal impact point search method of claim 11, wherein, Each grid corresponding to a laser point is represented by a pixel point in the preconfigured map, and each pixel point is represented by a grid; the preconfigured map is a specific size image mapped by laser points collected by the laser sensor of the robot; In the preconfigured map, each obstacle is composed of pixel points with the same pixel value and adjacent to each other, so that each obstacle is combined by adjacent grids in the preconfigured map.
16. The optimal impact point search method of claim 15, wherein, The number of connected pixels of a grid is the number of grids contained in the connected domain where the grid is located, so that the grid corresponding to a laser point corresponds to a connected domain; The connected domain is an image region composed of pixel points with the same pixel value and adjacent positions, or a grid set composed of adjacent grids with the same pixel value, and each grid or each pixel point in the same connected domain has the same number of connected pixels.
17. The optimal impact point search method of claim 16, wherein, Before searching for a grid satisfying a preset connectivity condition in the preconfigured map, a closing operation is performed on the preconfigured map, so that the contour line of the marked obstacle in the preconfigured map is completely described, wherein the closing operation is used to connect the connected domain in the preconfigured map; The preconfigured map is an image of a specific size belonging to a robot and used to describe the position characteristics of laser points. The closing operation comprises: After binarizing the preconfigured map, a binarized map is obtained; then the binarized map is subjected to image dilation processing, and the binarized map subjected to the image dilation processing is subjected to image erosion processing, so that part of the pixel points representing non-obstacles are configured as pixel points representing obstacles. In the binarized map, the pixel value of the pixel point representing the obstacle and the pixel value of the pixel point representing the non-obstacle are different.
18. A chip built-in control program, wherein the control program is used to control a robot to perform the optimal collision point searching method according to any one of claims 1 to 17.
19. A robot equipped with a laser sensor supporting 360 degree detection, characterized in that, The robot is built-in with the chip according to claim 18.
Citation Information
Patent Citations
Working area construction method of laser navigation robot
CN111595356A
Robot positioning method and device, computer storage medium and electronic equipment
CN113448326A