CN116466694A - Optimal collision point searching method based on laser points, chip and robot - Google Patents

Optimal collision point searching method based on laser points, chip and robot Download PDF

Info

Publication number
CN116466694A
CN116466694A CN202210029259.3A CN202210029259A CN116466694A CN 116466694 A CN116466694 A CN 116466694A CN 202210029259 A CN202210029259 A CN 202210029259A CN 116466694 A CN116466694 A CN 116466694A
Authority
CN
China
Prior art keywords
laser
point
grid
preset
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210029259.3A
Other languages
Chinese (zh)
Inventor
黄惠保
周和文
陈卓标
孙明
徐松舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Amicro Semiconductor Co Ltd
Original Assignee
Zhuhai Amicro Semiconductor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Amicro Semiconductor Co Ltd filed Critical Zhuhai Amicro Semiconductor Co Ltd
Priority to CN202210029259.3A priority Critical patent/CN116466694A/en
Publication of CN116466694A publication Critical patent/CN116466694A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0234Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using optical markers or beacons
    • G05D1/0236Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using optical markers or beacons in combination with a laser
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0221Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving a learning process
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0223Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving speed control of the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0238Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using obstacle or wall sensors
    • G05D1/024Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using obstacle or wall sensors in combination with a laser
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0246Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means
    • G05D1/0253Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means extracting relative motion information from a plurality of images taken successively, e.g. visual odometry, optical flow
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0257Control of position or course in two dimensions specially adapted to land vehicles using a radar
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0276Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle

Landscapes

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

Abstract

The invention discloses an optimal collision point searching method based on laser points, a chip and a robot. The invention can search out the optimal collision point in the continuous obstacle nearest to the robot body, and solves the problems of noise or unstable map of the laser data (including the coordinates, the detection angle and the laser distance of the laser point) acquired in the prior art.

Description

Optimal collision point searching method based on laser points, chip and robot
Technical Field
The invention relates to the technical field of laser navigation positioning, in particular to an optimal collision point searching method, a chip and a robot based on laser points.
Background
When a cleaning robot with a laser navigation positioning function performs cleaning work, the cleaning robot needs to find a starting point position for performing edge-along walking along the wall boundary of an indoor room before performing cleaning work in the indoor room area, start edge-along walking from the starting point position, finish the wall boundary of the indoor room area, and start cleaning the indoor room area.
The point cloud data acquired by the laser sensor of the cleaning robot has the characteristics of large data volume and high discrete degree, so that the laser data for constructing the map can carry noise; the laser point cloud map pre-constructed by the robot has fewer frames of laser frames, so that the laser point cloud map is blurred. Therefore, even if the cleaning robot is placed at the same place, the robot can find a plurality of obstacle collision positions at the same time, so that the cleaning robot can navigate to different obstacle collision positions and collide with the obstacle at the corresponding positions, and then starts to walk along the edge (can walk along the wall surface), thereby causing unstable navigation results and unstable edge walking modes of the cleaning robot.
Disclosure of Invention
In order to solve the technical problem, the invention searches each laser point of the laser frame, and searches an optimal collision point according to the pixel number characteristics of the connected domain where the falling point of the laser frame is positioned on the map, so that the robot can walk along the largest continuous obstacle closest to the stable position. The specific technical scheme comprises the following steps:
the optimal collision point searching method based on the laser points comprises the steps of searching grids meeting preset communication conditions in a preset map, marking coordinates of the grids meeting the preset communication conditions as coordinates of the optimal collision points in the preset map, and determining that physical positions reflected by the laser points corresponding to the grids meeting the preset communication conditions are optimal collision points.
Further, searching grids meeting preset communication conditions in the preset map, and marking the coordinates of the grids meeting the preset communication conditions as coordinates of optimal collision points in the preset map; searching a grid meeting a second preset communication condition in the preset map after the grid meeting the first preset communication condition cannot be searched in the preset map, and marking the coordinates of the grid meeting the second preset communication condition as the coordinates of the optimal collision point in the preset map; the preset communication conditions comprise a first preset communication condition or a second preset communication condition.
Further, when the grids meeting the first preset communication condition cannot be searched and the grids meeting the second preset communication condition cannot be searched, searching a laser point with the minimum laser distance in a laser frame, and marking the coordinates of the grids corresponding to the laser point as the coordinates of the optimal collision point in a pre-configuration map; the laser points searched by the robot are all from laser frames acquired by the robot; one laser spot corresponds to one laser distance.
Further, the laser point is used for representing the reflection position of laser emitted by the laser sensor of the robot on the obstacle, and the laser point is derived from a laser frame collected by the robot; the laser points are positioned in the effective detection angle range of the laser sensor and mapped into corresponding grids of the pre-configured map; in the effective detection angle range, one laser point corresponds to one unit detection angle, one laser point corresponds to one grid, one laser point corresponds to one laser distance, and the laser distance is used for reflecting the distance between the detected obstacle and the laser sensor installed on the robot.
Further, the grid satisfying the first preset communication condition is: in the pre-configured map, the number of the optimal neighborhood connected pixels is larger than a preset pixel number threshold value, and the grid corresponding to the first effective laser point with the largest number of the optimal neighborhood connected pixels and the smallest laser distance; the method comprises the steps that a preset range of a grid corresponding to a first effective laser point covers the grid corresponding to the first effective laser point; wherein, the optimal 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 preset map; one grid corresponds to one connected pixel number; the first effective laser point is a laser point with a laser distance within a preset detection distance range.
Further, the method for searching the grids meeting the first preset connection condition in the preset map includes marking the first effective laser points with the number of the optimal neighborhood connected pixels being greater than a preset pixel number threshold as first target laser points every time all grids in a preset range of the grids corresponding to the first effective laser points are searched; when all grids in a preset range of grids corresponding to each first effective laser point are searched, if only one first two-target laser point exists, marking the grid corresponding to the first two-target laser point as a grid meeting a first preset communication condition, marking the coordinate of the grid corresponding to the first two-target laser point as the coordinate of an optimal collision point in the preset map, and determining that the physical position point where the first two-target laser point is located is the optimal collision point; when all grids in a preset range of grids corresponding to each first effective laser point are searched, if at least two first two-second-target laser points exist, marking the grid corresponding to the first two-second-target laser point with the smallest laser distance as a grid meeting a first preset communication condition, marking the coordinate of the grid corresponding to the first two-target laser point with the smallest laser distance as the coordinate of an optimal collision point in the preset map, and determining that the physical position point where the first two-second-target laser point is located is the optimal collision point; wherein the first two-target laser points are the first one-target laser points with the largest number of best neighborhood connected pixels in the pre-configuration map.
Further, after searching all grids in a preset range of grids corresponding to each first effective laser point, if grids with the number of connected pixels being larger than a preset pixel number threshold cannot be searched in a preset map, determining that grids meeting a first preset connection condition cannot be searched in the preset map, and then starting to search the grids meeting a second preset connection condition in the preset map; wherein the number of connected pixels is used to reflect the size of the obstacle such that a grid satisfying a first preset connection condition or a grid satisfying a second preset connection condition is configured as a grid occupied by the continuous obstacle.
Further, the grid satisfying the second preset communication condition is: in the pre-configured map, the optimal neighborhood is communicated with a grid corresponding to a second effective laser point with the number of pixels larger than a threshold value of the preset number of pixels and the minimum laser distance; wherein, the preset range of the grid corresponding to the second effective laser point is covered to the grid corresponding to the second effective laser point; wherein, the optimal neighborhood connected pixel number of a second 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 second effective laser point and the preset map; wherein the second effective laser point is a laser point whose laser distance is associated with the size of the fuselage; the distribution range of the second effective laser point in the pre-configuration map is larger than that of the first effective laser point in the pre-configuration map.
Further, the method for searching the grids meeting the second preset connection condition in the preset map includes marking the second effective laser point as a second first target laser point when the second effective laser point with the number of the optimal neighborhood connected pixels being larger than the threshold value of the preset number of pixels is detected every time all grids in the preset range of the grids corresponding to the second effective laser point are searched; when all grids in the preset range of the grids corresponding to each second effective laser point are searched, marking the grid corresponding to the second target laser point with the smallest laser distance as the grid meeting the second preset communication condition, marking the coordinate of the grid corresponding to the second target laser point as the coordinate of the optimal collision point in the preset map, and determining that the physical position of the second target laser point is the optimal collision point.
Further, after searching all grids in a preset range of grids corresponding to each second effective laser point, if the number of connected pixels cannot be searched in the preset map and is larger than a preset pixel number threshold value, determining that the grids meeting the second preset connection condition cannot be searched in the preset map, searching the laser point with the smallest laser distance in the laser frame, marking the coordinate of the grid corresponding to the laser point as the coordinate of the optimal collision point in the preset map, and determining that the physical position of the laser point is the optimal collision point.
Further, the sources of the coordinates of the grid corresponding to the laser point include: and converting the laser point into a coordinate system of the pre-configured map by converting the coordinate of the laser point subjected to the coordinate shift into grid coordinates according to a preset ratio by taking a trigonometric function conversion result of the laser distance of the laser point as a coordinate shift amount.
Further, the effective detection angle range of the laser sensor is 0-360 degrees, 360 laser points exist in the laser frame, and 360 different laser distances are respectively corresponding to the laser points; the laser distance of the laser point changes along with the change of the unit detection angle of the laser point, and the unit detection angle of the laser point is in the effective detection angle range of the laser sensor.
Further, the preset range of the grid corresponding to the laser point is a neighborhood grid range of the grid corresponding to the laser point, and the neighborhood grid range comprises the grid corresponding to the laser point.
Further, the preset range of the grid corresponding to the laser point is a four-adjacent area of the grid corresponding to the laser point, and the preset range comprises the grid corresponding to the laser point and the adjacent grids which are up, down, left and right and take the grid corresponding to the laser point as a center, so that the calculated amount of coordinates is reduced.
Further, the grids corresponding to each laser point are represented by pixel points in the pre-configuration map, and each pixel point is represented by a grid; the preconfigured map is an image with a specific size, which is mapped by a laser point acquired by a laser sensor of the robot; each obstacle is composed of adjacent pixel points with the same pixel value in the pre-configuration map, so that each obstacle is composed of adjacent grids in the pre-configuration map.
Further, the number of connected pixels of one grid is the number of grids contained in the connected domain in which the grid is located, so that the grid corresponding to one laser point corresponds to one 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.
Further, before searching a grid meeting a preset communication condition in the preset map, performing a closing operation on the preset map so that the outline of the obstacle marked in the preset map is completely described, wherein the closing operation is used for connecting a communication domain in the preset map; wherein the pre-configured map is an image of a specific size constructed by the robot to describe the position features of the laser spot.
Further, the closing operation includes obtaining a binarized map after binarizing the pre-configured map; then, performing image expansion processing on the binary map, and performing image corrosion processing on the binary map subjected to the image expansion processing, so that partial pixels representing non-obstacles are configured as pixels representing the obstacles; in the binarized map, the pixel value of the pixel representing the obstacle is different from the pixel value of the pixel representing the non-obstacle.
And a chip, wherein a control program is built in the chip and used for controlling the robot to execute the optimal collision point searching method.
A robot equipped with a laser sensor supporting 360 degree probing, the robot incorporating said chip.
Compared with the prior art, the method and the device have the advantages that firstly, the grids meeting the first preset communication condition are searched in the preset range of the grids corresponding to the laser points with smaller distribution range in a preset map, and then the coordinates of the grids meeting the first preset communication condition are marked as the coordinates of the optimal collision points; if the grids meeting the first preset communication condition cannot be searched in the preset range of the grids corresponding to the laser points with smaller distribution range, the grids meeting the second preset communication condition are searched in the preset range of the grids corresponding to the laser points with larger distribution range, and then the coordinates of the grids meeting the second preset communication condition are marked as the coordinates of the optimal collision points, so that the optimal collision points can be searched in the continuous obstacle with the largest size nearest to the robot body, the problem that noise or a map is unstable in the laser data (comprising the coordinates, the detection angle and the laser distance of the laser points) collected in the prior art is solved, noise information in an image area corresponding to the preset map is filtered, the probability of selecting the collision position of the isolated obstacle and the robot as the optimal collision points is reduced, and the probability of the robot to preferentially select the obstacle to walk along the edge is further reduced; the probability of selecting the position which cannot collide with the obstacle or the position which cannot detect the obstacle in the actual physical environment as the starting point of the robot walking along the edge is reduced, and the environmental adaptability of the searched optimal collision point is enhanced.
Drawings
Fig. 1 is a flow chart of a laser point-based optimal collision point search method disclosed in an embodiment of the present invention.
Fig. 2 is a flowchart of a method of searching for a grid satisfying a first preset connected condition, which is disclosed in another embodiment of the present invention.
Fig. 3 is a flowchart of a method of searching for a grid satisfying a second preset connected condition according to still another embodiment of the present invention.
Detailed Description
The following describes the technical solution in the embodiment of the present invention in detail with reference to the drawings in the embodiment of the present invention. For further illustration of the various embodiments, the invention is provided with the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments and together with the description, serve to explain the principles of the embodiments. With reference to these matters, one of ordinary skill in the art will understand other possible embodiments and advantages of the present invention. A process or method depicted as a flowchart. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
As an embodiment, the method for searching the optimal collision point based on the laser point according to the embodiment of the present invention may be performed by a laser point cloud data processing device, where the laser point cloud data processing device may be implemented by software and/or hardware and may be generally integrated in a laser navigation robot, the laser navigation robot may be used as an execution body of the method, a laser sensor may be disposed on the laser navigation robot, the laser sensor may detect an obstacle, data reflected by a surface of a body peripheral object of the robot by a laser beam emitted by the laser sensor forms point cloud data of the peripheral object, and the body peripheral object may be identified as an obstacle and marked in a map, where the point cloud data includes position information of the surface of the obstacle scanned by a laser beam of the laser sensor, that is, a longitudinal distance, a lateral offset and a detection angle of the scanned surface of the obstacle relative to the laser sensor, the laser point cloud may be regarded as a set of laser points, and a laser frame is used to divide the laser points when constructing the map, and the laser frame is a set of 360-degree laser points, that is, a set of laser points is. The data of one laser spot indicates position information (including laser distance) of the surface of the obstacle scanned by the laser beam emitted in one detection angle direction of the laser sensor. In a general scene, in the indoor moving process of the laser navigation robot, whether an obstacle exists around can be detected by a laser sensor arranged on the laser navigation robot and marked on a map in real time, a latest generated laser frame is needed to be used at the moment, the laser frame comprises a plurality of laser points which can be regarded as a set of the laser points, the laser frame data comprises the laser points, and the laser points contained in the laser frame are needed to be used when obstacle information is marked on the map, so that a two-dimensional point cloud model is built for the surrounding environment of the laser navigation robot based on an SLAM technology, and a pre-configured map can be built by the laser frames obtained in advance; hereinafter, the laser navigation robot will be simply referred to as a robot. The preconfigured map is a map of a first working area of the robot, which is not processed by the optimal collision point searching method, and can be marked with an obstacle with the farthest distance in a room area where the robot is located, so that the robot has a large enough passable area in the first working area, wherein the area of the first working area of the robot is smaller than that of the room area where the robot is located. Preferably, the preconfigured map is a rectangular map area, and the length and the width of the rectangular map area are configured adaptively according to the size of the actual working environment or according to the distribution characteristics of the obstacles in advance.
Specifically, a controller inside the robot reads laser point cloud data or a depth image including the laser point cloud data acquired by a laser sensor in real time, builds a starting point cloud model to create a point cloud map, projects and converts the point cloud map into a two-dimensional grid map usable for navigation, i.e., a preconfigured map, as a two-dimensional point cloud map reflecting environmental information detected by the robot on a traveling plane, the preconfigured map being regarded as a map image, and then converts two-dimensional road sign information corresponding to point cloud positions of the preconfigured map (two-dimensional point cloud map) one by one so as to perform related image processing operations within the preconfigured map. In the map coordinate system of the pre-configured map, that is, the aforementioned two-dimensional grid coordinate system, the origin of the map coordinate system of the pre-configured map may be defined at the assembly position of the driving wheel of the robot, the laser sensor, or the body center position, which is not limited herein. In the preconfigured map, the coordinates of each grid are the coordinates of the lower left corner of the grid, the coordinates of the upper left corner of the grid or the coordinates of the lower right corner of the grid, and in some implementation scenarios, the center position of the grid is used to represent the real geographic 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 central position of the grid can also represent the row number and the column number of the grid in the pre-configured map, the abscissa is equal to the column number, and the ordinate is equal to the row number, in this embodiment, the coordinates of the grid corresponding to the laser point are coordinates in which the laser point is converted into the pre-configured map, and are also called as map coordinates of the laser point, and correspondingly, the grid corresponding to the laser point is a map coordinate point corresponding to the laser point or is directly 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 map coordinates of the laser point.
In some embodiments of the preconfigured map, the grid is traversed from left to right, with the column sequence numbers progressively increasing; traversing the grid from bottom to top, the row sequence numbers are gradually increased. Thereby ensuring that the path generated from grid-to-grid connection within the pre-configured map is continuous. Preferably, the preconfigured map or the global grid map where the preconfigured map is located is composed of row cells and column cells, starting from the upper left corner of the cells, the row direction is the y coordinate, the column direction is the x coordinate, the coordinates of each cell are defined by the row and column positions of each cell, and each cell is the grid. The grid to which a laser spot corresponds is represented using a single cell and then a line is represented by a series of adjacent cells, the set of adjacent cells may represent an area, each cell having a value representing category data such as the type of environmental information of the mark, the type of obstacle.
In this embodiment, the grids corresponding to each laser point collected by the laser sensor of the robot are represented by pixel points in the preconfigured map, each pixel point is represented by a grid with a specific size, where the grid with a specific size is each grid in the two-dimensional grid map, and the pixel point is used as a unit pixel in the preconfigured map, and of course, the grid is used as a unit grid in the preconfigured map, so that one laser point corresponds to one grid; preferably, in the map configuration condition that the pre-configuration map configures the pixel points as the grids, the robot configures one pixel point as a 5 cm by 5 cm cell as the grid for filling the pre-configuration map, at this time, the grid is equivalent to the 5 cm by 5 cm cell, and one laser point corresponds to one grid, so in this embodiment, for one pre-configuration map or a local map in the pre-configuration map, one grid also corresponds to only one connected domain, and the size of this connected domain is the number of connected pixel points, which is also called a connected number, and may be selectively stored in the corresponding grid. Wherein, the number of pixel points composing the connected domain can reflect the size of the obstacle.
In the edgewise navigation scene, the robot is generally controlled to search out the nearest wall obstacle, after the nearest wall obstacle is navigated to and touches the surface of the nearest wall obstacle, the robot sets the touching position as an edgewise starting point, then the robot starts from the touching edgewise starting point, and adjusts the advancing direction of the robot so that the robot starts to execute edgewise walking along the wall surface, and the robot can execute edgewise walking along the continuous obstacle boundary (four walls in the same room, all the four walls are continuous and integral and do not belong to isolated obstacles) within a certain area range under the same collision scene. At this time, the robot collides with one obstacle collision point in the nearest wall obstacle, the invention needs to search out an optimal obstacle collision point, and also determines that the obstacle collision point has an appropriate continuous obstacle which is convenient for the robot to walk along, so that the robot can navigate to a position where the robot collides with the obstacle collision point or a position where the robot collides with the obstacle collision point, then the robot configures the position as a robot along starting point before moving, and in order to start entering the along working mode, the robot preferentially navigates to the robot along starting point and contacts with the optimal obstacle collision point on the body. Then, the robot only runs along the outer contour and starts to work normally; however, since the robot can only sense the environment through the data of the laser spot, and the data of the laser frame (one frame of point cloud data, one frame of laser spot data or one frame of laser data) is only 360 degrees of the data of the laser spot, the accuracy of identifying continuous type obstacles such as a wall is not high, and the collected laser spot is unstable, and the one frame of laser data (the data of the laser spot) is easy to have noise, so that a gap occurs on a wall boundary marked in a pre-configured map, or the robot identifies island obstacles (protruding and non-crossing and non-pushing obstacles) as the wall so as to enable the robot to walk around a post preferentially along the edge.
According to the embodiment of the invention, the optimal collision point searching method is executed to find the effective wall body position point with the shortest distance from the robot body, namely the projection position point of the corresponding wall body on the ground, and the effective wall body position point is configured as the optimal collision point. The basic concept of the optimal collision point searching method comprises the following steps: the robot searches a grid meeting preset connection conditions in the preset map, marks the coordinates of the grid meeting the preset connection conditions as coordinates of an optimal collision point in the preset map, determines that the physical position reflected by the laser point corresponding to the grid meeting the preset connection conditions is the optimal collision point, wherein the preset connection conditions can be different connection conditions used for identifying obstacles such as walls and the like with continuous obstacle boundaries, the number of the connected conditions comprises the number characteristics of the pixel points, the laser point corresponding to the grid meeting any one of the connected conditions can be configured into the optimal collision point, the coordinates of the laser point corresponding to the grid meeting any one of the connected conditions are used as the coordinates of the optimal collision point in the actual physical environment, the coordinates of the grid corresponding to the laser point are used as the coordinates of the optimal collision point in the preset map, the continuous obstacle exists at the optimal collision point is the largest continuous obstacle with the size searched in the preset map, and meanwhile, the optimal collision point is the closest to the robot body in the largest continuous obstacle with the size. It should be noted that, the laser points collected by the robot correspond to the grids in the pre-configured map, and the laser data collected by the robot at present can be converted to the grids of the map constructed by the robot, so that the grids which are communicated with each other are calculated and processed, but the neighborhood of the grid corresponding to the laser points may exceed the boundary of the pre-configured map. Alternatively, before the optimal collision point searching method is performed, laser data currently collected by the robot may be converted into the pre-configured map in real time, and obstacle information may be marked in an unstable state. Therefore, according to the embodiment of the invention, continuous obstacles such as a wall body are searched according to the specific communication condition of the landing points of the collected laser points on the map, so that the optimal collision point is determined, the occurrence probability of the phenomenon that no obstacle exists at the searched optimal collision point is reduced, and the problem of misjudgment caused by unstable laser data collected by a robot recently is solved.
When the robot starts to walk along the area limited by the pre-configuration map, the obstacle to which the optimal collision point belongs is the first obstacle along which the robot belongs, at the moment, the starting point of the edge of the robot is not the optimal collision point, but is a position point near the optimal collision point, which allows the robot to contact the obstacle to which the optimal collision point belongs, at the moment, the robot can determine that the first navigation target position can contact the obstacle to which the optimal collision point belongs.
In one implementation, 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 pre-configured map to form a ground area where the wall is located; then, the wall body is constructed as a two-dimensional plane boundary of the pre-configuration map through an area connected domain algorithm (Connected Components With Stats), so that detection data of the wall body is converted into a ground area where the wall body is located by the robot, wherein the ground area can be a line segment which is understood to be a line segment which is actually detected and belongs to a contour boundary line of the wall body and projects on the ground, namely, a representation form of the continuous barrier in the pre-configuration map disclosed by the embodiment can be used as a boundary line of a first working area of the robot.
It should be noted that, when the robot starts from any position in the room to find a wall body obstacle (continuous obstacle), and detects the wall body or collides with the wall body, the robot is triggered to enter a working mode of edge-following walking, and in the working mode of edge-following walking, the robot adjusts the advancing direction of the robot to be parallel to the wall surface contour line or the boundary line projected by the wall body on the ground, namely, edge-following is realized; meanwhile, an edge starting point suitable for the robot is arranged, belongs to a navigation target point, and can be a position point of the robot which collides with the obstacle, but is not the optimal collision point, can be in the neighborhood of the grid corresponding to the optimal collision point or in a preset distance range of the optimal collision point, and is not occupied by the obstacle; and then the robot walks along the current advancing direction, and the current advancing direction is kept parallel to the wall surface contour line or the boundary line projected by the wall body on the ground, namely, the robot walks along the edge.
In addition, the coordinates of the robot at this time and the angle of the robot advancing (the angle of the robot advancing direction with respect to the X-axis direction of the map coordinate system or the angle of the robot advancing direction with respect to the Y-axis direction of the map coordinate system) are recorded in a map (which may be equivalent to the preconfigured map) constructed in real time by the robot, and then the edgewise walking (the wall-following walking) is maintained in parallel with the wall surface from this edgewise starting point, wherein the robot advancing direction is adjusted to be parallel with the wall surface extending direction.
As an embodiment, as shown in fig. 1, the laser point-based optimal collision point search method includes: s1, acquiring a pre-configuration map and acquiring a laser frame; specifically, the robot acquires a pre-configured map marked with obstacle information, and simultaneously acquires a laser frame currently acquired by the laser sensor, including data of a laser spot currently acquired (acquired laser data within an effective detection angle range of 360 degrees), so as to process a communication relation of the data of the laser spot included in the laser frame in the pre-configured map. And then proceeds to step S2.
And S2, judging whether grids meeting the first preset communication condition are searched in the preset map, if yes, entering a step S4, otherwise, entering a step S3. The preset communication conditions described in the foregoing embodiments include a first preset communication condition or a second preset communication condition; in this embodiment, the grid searched by the robot in the preconfigured map may be a grid corresponding to the collected laser point, and the grid corresponding to the laser point may be a seed grid; it should be noted that, one laser point falls into one grid corresponding to the preconfigured map, and the coordinates corresponding to the laser point are converted into the coordinates of one grid of the preconfigured map, but one grid may allow a plurality of laser points to fall into, that is, the coordinates of a plurality of different laser points may be converted into the coordinates of the same grid without being limited to the same laser frame; the laser spot currently acquired does not necessarily fall within the neighborhood grid region of the grid.
And step S3, judging whether grids meeting the second preset communication conditions are searched in the preset map, if yes, entering step S5, otherwise, entering step S6. After the robot judges that the grid meeting the first preset communication condition cannot be searched in the preset map, the robot judges whether the grid meeting the second preset communication condition is searched in the preset map or not. The map area ranges applicable to the grids meeting the first preset communication condition and the grids meeting the second preset communication condition are different; optionally, the range of the map area applicable to the grid meeting the first preset communication condition is smaller than the range of the map area applicable to the grid meeting the second preset communication condition, and the distribution density of the laser points in the two map area ranges is different. In some embodiments, when the robot searches for a grid satisfying the first preset connection condition within the preset range of the grid corresponding to each laser point included in the laser frame, step S4 is executed, otherwise step S3 is executed.
And S4, marking the coordinates of the grids meeting the first preset communication condition as the coordinates of the optimal collision points in the preset map, namely the coordinates of the optimal collision points in the corresponding map coordinate system. After searching the grid meeting the first preset communication condition in the preset map, the robot acquires the coordinates of the grid meeting the first preset communication condition and is configured as the coordinates of the optimal collision point in the coordinate system of the preset map, and correspondingly, the robot can acquire 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).
And S5, marking the coordinates of the grids meeting the second preset communication condition as the coordinates of the optimal collision points in the preset map, namely the coordinates of the optimal collision points in the corresponding map coordinate system. After searching the grid meeting the second preset communication condition in the preset map, the robot acquires the coordinates of the grid meeting the second preset communication condition and is configured as the coordinates of the optimal collision point in the coordinate system of the preset map, and correspondingly, the robot can acquire 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).
And S6, searching a laser point with the minimum laser distance in the laser frame, and marking the coordinate of the grid corresponding to the laser point as the coordinate of the optimal collision point in the pre-configured map. In the step S6, after the robot does not search for the grid satisfying the first preset connection condition and the robot does not search for the grid satisfying the second preset connection condition, the robot configures the laser point with the smallest laser distance as the optimal collision point in the currently acquired laser frame, and marks the coordinate of the laser point as the coordinate of the optimal collision point in the laser radar coordinate system. The laser points corresponding to the grids searched by the robot in the preset map are all from the laser frames currently collected by the robot; one laser spot corresponds to one laser distance.
According to the optimal collision point searching method in the steps S1 to S6, the optimal collision point is obtained according to the condition that the data of the laser points meet the communication condition in the pre-configured map, the filtering of the mixed points in the pre-configured map in a mode of enumerating the laser points is realized, the unstable map and the unstable laser data have certain adaptability, and no obstacle is avoided near the position where the robot starts to walk along the edge.
In the foregoing embodiment, the data reflected by the surface of the object around the body of the robot is scanned by the laser beam emitted by the laser sensor to form the point cloud number of the object around, the laser point is the reflection position of the laser emitted by the laser sensor for characterizing the robot on the obstacle, the laser point is a laser frame acquired by the robot, and the laser frame is a set of laser points scanned by the laser sensor at 360 degrees, namely, a frame of point cloud; the optimal collision point is a position occupied by a continuous barrier, such as a boundary point or a notch position of a wall; the laser points are located in the effective detection angle range of the laser sensor and mapped into corresponding grids of the pre-configured map, specifically, laser data is converted from a laser radar coordinate system to a map coordinate system, and laser distance can be converted into a grid representation. In the effective detection angle range, one laser point corresponds to a unit detection angle (scanning angle of a laser beam emitted by a laser sensor), one laser point corresponds to a grid, one laser point corresponds to a laser distance, the laser distance is used for reflecting the distance between a detected obstacle and the laser sensor installed by the robot, the laser distance can be the distance between the reflecting position of the obstacle and the center of the robot body, the distance can be adjusted according to the setting mode of a map coordinate system, and the origin of the map coordinate system of the pre-configured map can be defined at the assembly position or the center position of the robot driving wheel, the laser sensor of the robot body, and is not limited. In this embodiment, the effective detection angle range of the laser sensor is 0 to 360 degrees, 360 laser points exist in the laser frame and respectively correspond to 360 different laser distances, so that in the corresponding grid space, the laser distance at the unit detection angle with 0 degree is 1 meter, and the laser distance at the unit detection angle with 1 degree is 1.1 meter; thus, in this embodiment, there is one laser point in each unit detection angle and one laser distance is matched, and the laser distances of different laser points are not equal corresponding to the laser frame. Therefore, laser points which are large in data quantity and high in discreteness and collected by the laser sensor are conveniently and uniformly converted onto map coordinates of the pre-configured map, the obtained data of the discrete laser points can be described in the same coordinate system, and identification and arrangement of coordinate information and grid quantity belonging to the same connected domain in the same coordinate system are also facilitated.
On the basis of the above embodiment, the grid satisfying the first preset communication condition is: and in the pre-configured map, the number of the optimal neighborhood connected pixels is larger than a threshold value of the number of the preset pixels, and the grid corresponding to the first effective laser point with the largest number of the optimal neighborhood connected pixels and the smallest laser distance is arranged. In this embodiment, the source of the grid satisfying the first preset connection condition includes that, among the laser points falling into the preset map, the grid corresponding to the first effective laser point is taken as a central grid (seed grid), the number of connection pixels with the largest value is screened out from the number of connection pixels corresponding to each grid in the central grid and the neighbor grids thereof, and the number of connection pixels with the largest value is used as the optimal neighbor connection pixels of the grid corresponding to the first effective laser point, and the comparison of the number of the optimal neighbor connection pixels of each first effective laser point falling into (converted into) the preset map is performed, so that the grid corresponding to the first effective laser point with the largest number of the optimal neighbor connection pixels and the smallest laser distance, which is larger than the threshold value of the preset pixel number, can be implemented in the preset map, is used as the grid satisfying the first preset connection condition. Optionally, all grids in the preset range of the grids corresponding to each first effective laser point are not necessarily located in the preset map, the grids corresponding to the first effective laser points are not necessarily located in the preset map, and the laser distance is within the preset detection distance range. Preferably, the preset detection distance range is larger than the radius of the robot body (when the robot is a sweeping robot with a round shell), but smaller than 1.5 meters, the laser points of the laser distance in the preset detection distance range are all first effective laser points, the grid meeting the requirement is searched by using the characteristics of the number of the communicated pixels of the first effective laser points, the contour points of effective continuous obstacles can be searched in the larger area range of the communicated area, the interference of the data information of the laser points reflected by more isolated obstacles is eliminated, the probability of fitting the isolated obstacle line segments with non-negligible lengths into a physical wall is reduced, and the influence of misjudgment of the contour line segments as the wall is reduced.
In this embodiment, a preset range of a grid corresponding to a first effective laser point covers the grid corresponding to the first effective laser point, and specifically, the preset range of the grid corresponding to the first effective laser point is a neighborhood grid range of the grid corresponding to the first effective laser point, including the grid corresponding to the first effective laser point; in this embodiment, the configuring the preset range for the first effective laser point considers that the first effective laser point or the grid corresponding to the first effective laser point may have a noise factor, and the grid corresponding to the first effective laser point needs to be used as a central grid to expand a grid towards the periphery in the preset expansion direction, and then search is performed in the expanded grid area. The number of the optimal neighborhood connected pixels of the first effective laser point is the maximum value in the number of the connected pixels of all grids in the overlapping area of the preset range of the grid corresponding to the first effective laser point and the preset map, and one grid with the maximum number of the connected pixels can be obtained by enumerating and comparing the number of the connected pixels of each grid in the overlapping area, and at the moment, the number of the connected pixels with the maximum value in the preset range of the first effective laser point is configured as the optimal neighborhood connected pixels of the first effective laser point, because the optimal neighborhood connected pixels are the search results in the grid area expanded by taking the grid corresponding to the first effective laser point as the central grid, the continuous barrier with larger size, such as a wall body, is facilitated to be searched; thereby eliminating the interference of straight lines of non-continuous obstacles (isolated non-crossing protruding obstacles such as battens, columns and the like) and improving the accuracy and the intelligent level of distinguishing the wall from the non-wall obstacles of the robot.
It should be noted that, in some embodiments, all grids within the preset range of the grid corresponding to the first effective laser point may be mutually connected to form an independent connected domain, and then the number of connected pixels of all grids within the preset range of the grid corresponding to the first effective laser point is equal.
It is noted that, one laser point falls into one grid corresponding to the preconfigured map, the coordinates corresponding to the laser point are converted into the coordinates of one grid of the preconfigured map, but one grid can allow a plurality of laser points to fall into corresponding to different laser frames, and the coordinates of a plurality of different laser points can be converted into the coordinates of the same grid; in some embodiments, the preset range of a grid includes the grid itself and its neighborhood grid region, but its neighborhood grid region does not necessarily fall within the corresponding laser point, and may fall within the preset range only at the grid.
As an embodiment, as shown in fig. 2, the method for searching the grid meeting the first preset connection condition in the preset map includes:
step S201, marking the first effective laser points with the number of the optimal neighborhood connected pixels being greater than a preset pixel number threshold as first one-to-one target laser points every time all grids in a preset range of grids corresponding to the first effective laser points are searched; and then proceeds to step S202. Specifically, in the process of searching grids within a preset range of the grids corresponding to the first effective laser point, the robot sorts and compares the number of connected pixels of each grid in the preset map to obtain the maximum number of connected pixels, configures the maximum number of connected pixels as the optimal neighborhood connected pixels of the first effective laser point, and marks the first effective laser point as the first target laser point when the optimal neighborhood connected pixels are greater than a preset pixel number threshold. Preferably, the preset pixel number threshold is configured to be 16, and meanwhile, the preset range of the grid corresponding to the first effective laser point is the four adjacent regions of the grid corresponding to the first effective laser point, so that invalid laser data can be filtered; the optimal neighborhood connected pixels of one laser point can reflect the size characteristics of the obstacle where the laser point is located, when the size of the obstacle to be searched is larger, the outline of the continuity of the obstacle is longer, the corresponding optimal neighborhood connected pixels are larger, the preset pixel quantity threshold value is required to be configured to be larger, and the method can be used for identifying the wall.
It should be noted that, the number of connected pixels of each grid is obtained in advance, and the coordinate offset of the coordinates of the grid with respect to the origin of the map coordinate system is associated with the index address in the robot according to the coordinate information of the grid in the preconfigured map, and in some embodiments, the result may be obtained as the index address of the number of connected pixels of the grid by multiplying the ordinate offset of the grid with respect to the origin by the length of the preconfigured map in the horizontal axis direction and adding the abscissa offset of the grid with respect to the origin, and preferably, the connected domain information where the grid is located is also stored in the index address.
Specifically, in the step S201, after searching the grid with the largest number of connected pixels in the preset range of the grid corresponding to the first effective laser point and the preset map, the method is equivalent to searching the grid with the largest number of connected pixels in the preset range of the grid corresponding to the first effective laser point in the preset map, if the number of connected pixels of the grid is determined to be greater than the preset pixel number threshold, marking the first effective laser point as a first one-to-one target laser point, marking the number of connected pixels of the grid as the best neighborhood connected pixel number corresponding to the first one-to-one target laser point, marking the laser distance of the first effective laser point as the laser distance of the first one-to-one target laser point, and simultaneously recording the laser distance of the first one-to-target laser point and the best neighborhood connected pixel number, so as to facilitate comparison with the information of the same type searched out later, and realize accurate identification of continuous obstacles.
Step S202, when all grids in the preset range of the grids corresponding to each first effective laser point are searched, judging whether only one first two-target laser point exists or not, if yes, entering step S203, otherwise, entering step S204. In this embodiment, the robot sequentially completes enumeration and comparison of the number of connected pixels of each grid within a preset range of the grids corresponding to each first effective laser point, and then obtains first two-target laser points, so far, the robot completes traversal of all laser points falling within a preset detection distance range, and completes search of all grids or neighbor grids within the preset detection distance range, namely completes search of the number of connected pixels of the grids within an effective detection distance which is larger than one radius of the machine body and smaller than 1.5 meters or other limited.
It should be noted that, every time grids in the preset range of the grids corresponding to all the first effective laser points are searched in the area defined by the preset map, the first one-to-one target laser point with the largest number of connected pixels is marked as a first two-target laser point; the first two-target laser spot is the first one with the largest number of best neighborhood connected pixels within the pre-configured map.
Step S203, determining that only one first two-target laser point exists, marking a grid corresponding to the first two-target laser point as a grid meeting a first preset connection condition, marking a coordinate of the grid corresponding to the first two-target laser point as a coordinate of an optimal collision point in the preset map, determining that a physical position point where the first two-target laser point is located is the optimal collision point, and determining that the continuous obstacle exists at the grid corresponding to the first two-target laser point, namely, the robot recognizes the continuous obstacle of the wall type for the robot to walk along edges.
Step S204, determining that at least two first two-target laser points exist, marking grids corresponding to the first two-target laser points with the smallest laser distance as grids meeting a first preset communication condition, marking coordinates of the grids corresponding to the first two-target laser points with the smallest laser distance as coordinates of optimal collision points in the preset map, determining that the physical position of the first two-target laser points is the optimal collision point, and determining that the grids corresponding to the first two-target laser points are occupied by the continuous obstacle, namely, the robot recognizes the continuous obstacle with the wall type, so that the robot walks along the edge.
In summary, step S201 to step S204 search for a grid meeting the first preset connection condition within a preset range of the grid corresponding to the laser point with limited distribution range, and then mark the coordinates of the grid meeting the first preset connection 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 of the robot body closer to the boundary point, that is, obtain the grid meeting the first preset connection condition by searching the number of the connected pixels with the largest value, and take the laser point corresponding to the grid as the optimal collision point, thereby realizing the search for the grid corresponding to the optimal collision point in the grid area with the larger connected area by enumerating the laser points in the smaller map area. Subsequently, the robot, after navigating to contact the obstacle at the optimal collision point, starts to walk along the edge of the contour of the contacted obstacle, in particular, the robot walks along the contour of the contacted obstacle, the advancing direction of the robot is kept parallel to the contour line of the obstacle.
It should be noted that, in an indoor environment where a robot works, the obstacle boundaries on both sides of the left and right end points of the gap refer to the obstacle boundaries having continuity in a certain area, and generally include a plurality of boundary points, not just one boundary point. For example, the gap may be a door opening of a room, the barriers on both sides of the door opening are four walls in the same room, and the four walls are continuous and integrated and do not belong to isolated barriers. Therefore, in this embodiment, the wall obstacle and the island obstacle (protruding obstacle that cannot be spanned and cannot be pushed) can be distinguished through the steps S201 to S204, so as to overcome the problem that the robot cannot accurately identify the wall only by the laser data included in the laser frame, for example, avoid approaching a wood strip and determining the position point closest to the robot in the wood strip as the optimal collision point, so that the robot walks along the wood strip.
On the basis of the above embodiment, after searching all grids within the preset range of the grids corresponding to each first effective laser point, if the grids with the number of connected pixels larger than the threshold value of the preset number of pixels cannot be searched in the preset map, determining that the grids meeting the first preset connection condition cannot be searched in the preset map, and then the robot performs step S3 by executing step S2 to start searching the grids meeting the second preset connection condition in the preset map, so as to realize searching the grids meeting the second preset connection condition in the grids corresponding to the laser points within the new range. Correspondingly, in the preset map, when the robot cannot search for grids with the number of connected pixels larger than the threshold value of the number of preset pixels in all grids within the preset range of the grids corresponding to all the first effective laser points, determining that the grids corresponding to the first effective laser points cannot be marked as grids meeting the first preset connection condition, wherein the number of connected pixels of the grids within the preset range of the grids corresponding to each first effective laser point searched by the robot is smaller and insufficient for describing continuous obstacles such as walls; it should be noted that the number of connected pixels is used to reflect the size of the obstacle such that the grid satisfying the first preset connection condition or the grid satisfying the second preset connection condition is configured as the grid occupied by the continuous obstacle.
As an embodiment, the grid satisfying the second preset communication condition is: and in the pre-configured map, the optimal neighborhood is communicated with a grid corresponding to a second effective laser point with the number of pixels larger than a threshold value of the preset number of pixels and the minimum laser distance. In this embodiment, in the laser points falling into the pre-configured map, the robot uses the grid corresponding to the second effective laser point as a central grid (seed grid), screens out the number of connected pixels with the largest value from the number of connected pixels corresponding to each grid in the central grid and the neighbor grids thereof, as the optimal neighbor connected pixels number of the grid corresponding to the second effective laser point, screens out the grid corresponding to the second effective laser point with the optimal neighbor connected pixels number larger than the threshold value of the preset pixel number and the minimum laser distance, and as the grid meeting the second preset connected condition, compared with the grid meeting the first preset connected condition, does not pursue the optimal neighbor connected pixels number as the maximum value, reduces the requirement on the contour line continuity degree of the obstacle, pursues the laser point with the nearest distance, and at this time, the distribution density of the laser points falling into the searched map area is higher. Optionally, the grids within the preset range of the grid corresponding to each second effective laser point are not necessarily located in the preset map, and 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 second effective laser spot is a laser spot whose laser distance is associated with the size of the body. Preferably, the laser distance is larger than the radius of the robot body (when the robot is a sweeping robot with a round shell), so as to avoid the collision of the laser sensor of the robot to an obstacle in the process of scanning detection, and among the laser points falling into the pre-configured map, the laser points with the laser distance larger than the radius of the robot body are second effective laser points; thus, the distribution range of the second effective laser points in the pre-configured map is larger than the distribution range of the first effective laser points in the pre-configured map, and the number of second effective laser points falling into or converted into the pre-configured map is larger than the number of first effective laser points. In this embodiment, the robot uses the feature of the number of connected pixels of the second effective laser spot to search for a grid meeting the requirement, so that an effective continuous obstacle boundary can be searched in a relatively short range, interference of data information of the laser spot reflected by an isolated obstacle at the short range is eliminated, and the phenomenon that the outline line segment of the obstacle around the robot body is misjudged as a wall body is reduced. And searching the grids meeting the second preset connection condition in the grid area with more densely distributed laser points (more second effective laser points are searched) in the map area with larger coverage.
In this embodiment, a preset range of a grid corresponding to a second effective laser point covers the grid corresponding to the second effective laser point, and specifically, the preset range of the grid corresponding to the second effective laser point is a neighborhood grid range of the grid corresponding to the second effective laser point, including the grid corresponding to the second effective laser point; in this embodiment, the configuring the preset range for the second effective laser point considers that the second effective laser point or the grid corresponding to the second effective laser point may have a noise factor, and the grid corresponding to the second effective laser point needs to be used as a central grid to expand a grid towards the periphery in the preset expansion direction, and then search is performed in the expanded grid area. The number of the optimal neighborhood connected pixels of the second effective laser spot is the maximum value in the number of connected pixels of all grids in the overlapping area of the preset range of the grid corresponding to the second effective laser spot and the preset map, and one grid with the maximum number of connected pixels can be obtained by enumerating and comparing the number of the connected pixels of each grid in the preset range of the grid corresponding to the second effective laser spot, and at this time, the number of the connected pixels with the maximum value in the preset range of the second effective laser spot is configured as the optimal neighborhood connected pixels of the second effective laser spot, because the number of the optimal neighborhood connected pixels is the search result in the grid area expanded by taking the grid corresponding to the second effective laser spot as the central grid. Therefore, the interference effect of the outline of the non-continuous barrier (the isolated non-crossing protruding barrier such as the batten, the pillar and the like) is eliminated in the area close to the robot body, the accuracy and the intelligent level of distinguishing the wall body and the non-wall body of the robot in a close range are improved, and the speed of the robot to start to execute the edgewise walking is increased.
As an embodiment, as shown in fig. 3, the method for searching the grid meeting the second preset connection condition in the preset map includes:
step S301, each time all grids within the preset range of the grid corresponding to the second effective laser point are searched, when the second effective laser point with the number of the optimal neighborhood communication pixels being greater than the preset pixel number threshold is detected, the second effective laser point corresponding to the grid with the number of the optimal neighborhood communication pixels being greater than the preset pixel number threshold is detected, and the second effective laser point is marked as a second target laser point; and then proceeds to step S302.
Specifically, during the process of searching grids in a preset range of the grids corresponding to the second effective laser point, the robot enumerates and compares the number of connected pixels of each associated grid in the preset map to obtain the maximum number of connected pixels, configures the maximum number of connected pixels as the optimal neighborhood connected pixels of the second effective laser point, and marks the second effective laser point as the second target laser point when the optimal neighborhood connected pixels are greater than a preset pixel number threshold. Preferably, the preset pixel number threshold is configured to be 16, and meanwhile, the preset range of the grid corresponding to the second effective laser point is the four adjacent regions of the grid corresponding to the second effective laser point, so that invalid laser data in a near region can be filtered; the number of the optimal neighborhood connected pixels of one laser spot can reflect the size characteristics of the obstacle where the laser spot is located, when the larger the obstacle to be searched is, the longer the horizontal contour of the continuity of the obstacle is, the larger the corresponding number of the optimal neighborhood connected pixels is, and the larger the preset pixel number threshold value is required to be configured, for example, the identification wall is required to be configured.
Specifically, in the step S301, after searching the grid with the largest number of connected pixels in the preset range of the grid corresponding to the second effective laser point, if the number of connected pixels of the grid is determined to be greater than the preset pixel number threshold, the second effective laser point is marked as the second target laser point, the number of connected pixels of the grid is marked as the best neighborhood connected pixels corresponding to the second first target laser point, and the laser distance of the second effective laser point is marked as the laser distance of the second target laser point, and meanwhile, the laser distance of the first target laser point is recorded, so that the comparison is conveniently performed between the information and the information of the same type searched later, the laser distance with smaller value is obtained, and the accurate identification of the continuous obstacle with shorter distance is realized.
And step S302, when all grids in the preset range of the grids corresponding to each second effective laser point are searched, marking the grid corresponding to the second first target laser point with the smallest laser distance as the grid meeting the second preset communication condition, marking the coordinate of the grid corresponding to the second first target laser point as the coordinate of the optimal collision point in the preset map, determining that the physical position of the second first target laser point is the optimal collision point, determining that the continuous obstacle exists at the grid corresponding to the second target laser point, for example, identifying the position point in the wall surface which is close to the robot, indicating the optimal collision point, and then the robot can spend a shorter distance to navigate to the optimal collision point and start to walk along the continuous obstacle.
In this embodiment, after the robot completes comparison of the laser distances of the second target laser points within the preset range of the grids corresponding to each second effective laser point, the robot obtains the second target laser point with the smallest laser distance, and as to the laser frames, the laser distances of each laser point are different, so that the laser frames fall into the laser points of the preset map, only one laser point with the smallest laser distance is included, and then the second target laser point with the smallest laser distance is obtained. Therefore, on the basis that the grids meeting the first preset communication condition cannot be searched in the preset range of the grids corresponding to the laser points with smaller distribution range, the grids meeting the second preset communication condition are searched in the preset range of the grids corresponding to the laser points with larger distribution range, and then the coordinates of the grids meeting the second preset communication condition are marked as the coordinates of the optimal collision point.
On the basis of the above embodiment, after searching all grids in the preset range of the grids corresponding to each second effective laser point, if the grids with the number of connected pixels larger than the preset pixel number threshold cannot be searched in the preset map, determining that the grids meeting the second preset connection condition cannot be searched in the preset map, then the robot performs step S6 by executing step S3 to search the grids corresponding to all the laser points in the laser frame for the laser point with the minimum laser distance, marks the coordinates of the grids 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 at the grid corresponding to the laser point. Correspondingly, the robot cannot search grids meeting the first preset communication condition in the preset map, and cannot search grids meeting the second preset communication condition in the preset map, so that the robot searches laser points according to each unit detection angle in the effective detection angle range, traverses and compares the laser distance of each laser point, acquires the laser point with the minimum laser distance from the laser points, marks the laser point with the minimum laser distance as an optimal collision point, marks the coordinate of the grid corresponding to the laser point with the minimum laser distance as the coordinate of the grid corresponding to the optimal collision point, and therefore the robot can acquire an optimal collision point on the nearest wall surface on the premise that the connected grids are not judged.
In summary, the invention can acquire an optimal collision point from the continuous obstacle closest to the robot body, solves the problem of unstable laser data (including coordinates, detection angles and laser distances) or unstable results caused by noise in the prior art, filters noise information in an image area corresponding to a pre-configuration map, reduces the probability of selecting the position of the outline of an isolated obstacle as the optimal collision point, reduces the probability of selecting the position of the obstacle which does not exist in the actual physical environment as the optimal collision point, and starts to walk along the boundary after the robot navigates to contact with the obstacle at the optimal collision point, in particular to walk along the boundary edge of the contacted obstacle, and the advancing direction of the robot is kept parallel to the boundary line of the obstacle, thereby enhancing the environmental adaptability of the robot to walk along the boundary.
As an embodiment, the sources of coordinates of the grid corresponding to the laser point include: in the pre-configured map, taking a trigonometric function conversion result of the laser distance of the laser point as a coordinate offset, wherein the coordinate offset comprises a horizontal axis coordinate offset and a vertical axis coordinate offset; optionally, in the trigonometric function conversion result of the laser distance of the laser point, the horizontal axis coordinate offset is obtained by adding a cosine function value of the laser distance of the laser point to a reference horizontal axis; the vertical axis coordinate offset is obtained by adding a sine function value of the laser distance of the laser point to a reference vertical axis; the laser distance of the laser point is converted into coordinates. Then, controlling the laser point to carry out coordinate offset according to the horizontal axis coordinate offset and the vertical axis coordinate offset, namely controlling the coordinates of the laser point in a laser radar coordinate system according to the horizontal axis coordinate offset and the vertical axis coordinate offset to carry out coordinate offset calculation; and converting the coordinates of the laser points subjected to coordinate offset into grid coordinates according to a preset ratio, wherein the grid coordinates are the number of grids in an integer form, so that the laser points are converted into a coordinate system of the pre-configured map, and then the laser points are subjected to rasterization processing in a unified coordinate system, and the discrete point cloud data obtained by the robot can be described in the same map coordinate system.
In some embodiments, the coordinate axis directions of the coordinate systems before and after the conversion need to be considered in the process of calculating the coordinate offsets; generally, the coordinate offset calculation mode is related to the directions of the abscissa axes of the two coordinate systems before and after conversion, when the positive directions of the abscissa axes of the two coordinate systems before and after conversion are the same, the abscissa of the laser spot in the laser radar coordinate system is controlled to subtract the abscissa offset, so as to obtain the abscissa of the laser spot subjected to coordinate offset; otherwise, the abscissa of the laser point in the laser radar coordinate system is subtracted from the horizontal axis coordinate offset to obtain the abscissa of the laser point subjected to coordinate offset. Similarly, the coordinate offset calculation mode is related to the directions of the ordinate axes of the two coordinate systems before and after conversion, and when the positive directions of the ordinate axes of the two coordinate systems before and after conversion are the same, the ordinate of the laser point in the laser radar coordinate system is controlled to subtract the ordinate offset of the ordinate axis to obtain the ordinate of the laser point subjected to the coordinate offset; otherwise, the ordinate of the laser point in the laser radar coordinate system is subtracted from the ordinate coordinate offset to obtain the ordinate of the laser point subjected to coordinate offset.
In some embodiments, the laser distance of the laser spot varies with the detection angle at which the laser spot is located, which is within the effective detection angle range of the laser sensor, wherein each laser spot falls within a unit detection angle, each laser spot 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-360 degrees, 360 laser points are acquired in a laser frame and respectively correspond to 360 different laser distances, when the unit detection angle is 1 degree, 360 areas are divided, and each laser point in the laser frame falls into one area; the laser distance of the laser spot within each region is different for a laser frame and each region belongs to a grid region. The effective detection angle range comprises a plurality of unit detection angles, and the number of the unit detection angles in one effective detection angle range is equal to the number of laser points in one frame of point cloud (laser frame).
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, where the laser point includes a first effective laser point and a 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, a circular area or the like of the grid taking the grid corresponding to the laser point as a center, and all the neighborhood can be represented by using the grid. In this embodiment, the preset range is set by taking noise factors existing in the collected laser points into consideration, a neighborhood grid needs to be expanded towards the periphery in a preset expansion direction by taking a grid corresponding to the laser points as a central grid, then searching is performed in an expanded grid area, so that errors caused by the noise factors carried by the central grid can be reduced, and meanwhile, the continuous barrier is easier to search in the expanded grid area, which is also a result based on connectivity consideration of the area.
Preferably, the preset range of the grid corresponding to the laser point is a four-adjacent area of the grid corresponding to the laser point, including the grid corresponding to the laser point and the adjacent grids on the upper, lower, left and right sides taking the grid corresponding to the laser point as the center, and compared with the grid area or the circle area of the eight-adjacent area, the number of the searched grids is smaller, so that the calculation amount of coordinates is reduced.
In some embodiments, the grid corresponding to each laser point is represented within the preconfigured map using pixels, each pixel being represented using a grid of a particular size such that one laser point corresponds to one grid; preferably, the pre-configuration map configures pixel points as grids, and configures one pixel point as a unit grid of 5 cm by 5 cm, as the grids for filling the pre-configuration map, one laser point corresponds to one grid, but one grid also corresponds to only one connected domain, and the size of the connected domain is the number of the connected pixel points. Wherein, the number of pixel points composing the connected domain can reflect the size of the obstacle.
In some embodiments, the preconfigured map is an image with a specific size, which is mapped by a laser spot collected by a laser sensor of the robot, and the image is formed by taking pixel points as unit elements, and each pixel point can be regarded as a grid (unit grid with a specific size); in the pre-configuration map, each obstacle is composed of adjacent pixel points with the same pixel value, so that each obstacle is composed of adjacent grids in the pre-configuration map, specifically, the pre-configuration map is processed by using connected domain analysis disclosed by the prior art, the obstacles at different positions can be marked as being composed of pixel points with different pixel values, the obstacles at different positions are composed of pixel points with different colors, for example, when the obstacle boundaries at the left and right end points of a gap are not connected in an indoor environment where a robot works, the obstacle boundaries at the left and right end points of the gap are respectively marked as the pixel points with different colors; the barrier boundary at one side of the left end point of the notch consists of pixel points of a blue communication area and consists of 46 communicated pixel points, and the number of communicated pixels of any pixel point in the blue communication area is 46; the barrier boundary at one side of the right end point of the notch is composed of pixel points of a green communication area and 92 communicated pixel points, and the number of communicated pixels of any pixel point in the green communication area is 92. The obstacle boundaries on the two sides of the left and right endpoints of the notch refer to the obstacle boundaries with continuity in a certain area range, for example, the notch can be a door opening of a room, the obstacles on the two sides of the door opening are four walls in the same room, the four walls are continuous and integrated and do not belong to isolated obstacles, the obstacles on the two sides of the left and right endpoints of the notch are marked as pixel points with the same color, and the number of the obtained connected pixels is relatively large.
In some embodiments, the preset pixel number threshold is a judgment threshold for representing the number of adjacent grids of the continuous type obstacle in the preconfigured map, so that when judging that the number of connected pixels of the corresponding grid is larger than the preset pixel number threshold, the robot recognizes that the continuous type obstacle exists at the position of the corresponding grid or determines that the number of connected pixels of the corresponding grid is larger than the preset pixel number threshold as one of the necessary technical characteristics of the continuous type obstacle existing in the corresponding grid. The method is beneficial to searching out barriers consisting of grids with larger number of connected pixels and the grids connected with the grids.
It should be noted that, the number of connected pixels of one grid is the number of grids contained in the connected domain where the grid is located, so that the grid corresponding to one laser point corresponds to one connected domain; when the grids corresponding to each laser point are represented by the pixel points in the pre-configuration map, the connected domain is a grid set formed by adjacent grids with the same pixel value; each grid or each pixel within the same connected domain has the same number of connected pixels.
The analysis (Connected Component Analysis, connected Component Labeling) of the connected domain refers to finding and marking each connected region in the image to which the preconfigured map belongs so as to mark the obstacle occupied by each position. In general, in the process of connected domain analysis, a foreground pixel point is selected as a seed, then foreground pixels adjacent to the seed are combined into the same pixel set according to two basic conditions (the pixel values are the same and the positions are adjacent) of the connected region, and the finally obtained pixel set is a connected region. In the preconfigured map of this embodiment, the relevant connection condition is that, in the neighborhood grid region of the seed grid, there is a target grid with an adjacent position and an equal pixel value with respect to the seed grid, then connection may be performed, the neighborhood grid region of the seed grid may be a range of up-down, left-right adjacent grids of the seed grid, that is, when any adjacent grid of the seed grid up-down, left-right adjacent grids is a target grid with an equal pixel value, the seed grid is connected with the target grid, a new mark value is given, the number of grids connected in the next is counted, the grids given with the new mark value are configured as connected grids, whether the neighborhood grid region of the connected grid contains a target grid with an equal pixel value is judged, if yes, connection is continued until no target grid with an equal pixel value is in the neighborhood grid region of the final connected grid, that is a non-target grid in the grid region of the final connected grid, that is, and when the connection is ended, the target grid contains a connected domain corresponding to point cloud data in the current connected process, the number of connected grids is the number of connected pixels in the current connected domain, and the number of connected grids is any connected pixel in the connected domain.
On the basis of the foregoing embodiment, at least one number of connected pixels is matched with a grid in a preset range of the grid corresponding to one laser point, where each number of connected pixels represents one connected domain, and further represents one clustering result of the laser point; one grid with the largest number of connected pixels exists in all grids within the preset range of the grid corresponding to one laser point, so that the number of connected pixels of the grid is configured to be the optimal neighborhood connected pixels of the first effective laser point or the optimal neighborhood connected pixels of the second effective laser point.
Therefore, the embodiment judges the falling point of each laser point of the laser frame on the map by enumerating each laser point, and calculates the final edge starting point according to whether the falling point is an obstacle or not; by enumerating the laser points, the miscellaneous points on the map can be effectively filtered, and the situation that the robot does not have obstacles needing to be along edges near the starting point position of the edge walking is avoided; in summary, the robot may calculate the optimal collision point according to the connection condition of the laser point in the laser frame to the corresponding grid in the preconfigured map; when a relatively large obstacle is found and the laser distance is the smallest, such as a wall with a relatively close distance, a grid or a pixel point corresponding to the optimal collision point can be determined in the preconfigured map.
As an embodiment of the pre-configured map, before searching the grid satisfying the preset connection condition in the pre-configured map, correspondingly, before executing the step S1, the robot performs a closing operation on the pre-configured map, so that the outline of the obstacle marked in the pre-configured map is completely described, where the closing operation is used to connect the connected domain so as to screen out the accurate grid position corresponding to the latest collected laser point, and belongs to repairing the marked pixel point in the pre-configured map in the image morphology sense, and in particular, smoothing the outline boundary line of the marked obstacle. In this way, the accuracy of the map information acquired in the step S1 and the grid information participating in the judgment in the step S2 and the step S3 which are executed subsequently is improved, and the influence of noise information carried in the laser frame acquired in the step S1 is reduced.
It should be noted that, the preconfigured map is an image of a specific size, which is constructed by the robot and is used for describing the position feature of the laser spot, so as to adapt to the actual obstacle distribution feature, and is also a map constructed by the robot according to the laser frame acquired before the current laser frame is acquired in step S1. The area defined by the pre-configured map may be a square area of 4m by 4 m.
Specifically, the closing operation includes: after binarizing a map image area with a specific size in a map pre-constructed by a robot, obtaining a binarized map; then performing image expansion processing on the binary map, and performing image corrosion processing on the binary map after the image expansion processing, so that partial pixels representing non-obstacles are configured as pixels representing obstacles, and gaps in contour lines of the obstacles in the binary map without the image expansion processing and the image corrosion processing are filled; in the binarized map, the pixel value of the pixel representing the obstacle is different from the pixel value of the pixel representing the non-obstacle, and in general, the pixel having a pixel value of 255 is configured to constitute the obstacle, and the pixel having a pixel value of 0 is configured to constitute the non-obstacle. Because the binarized map is divided into a plurality of sections, the same obstacle which is originally connected together may be caused by unstable map which is built in advance by the robot or unstable laser data, so that the map cannot reflect reality; the present embodiment repairs the missing portion between the same obstacles by the aforementioned closing operation.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, 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-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means 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 would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
In the above embodiments, the technical solution of the present application has been described by taking a robot capable of performing a sweeping task (simply referred to as a sweeping robot) as an example, but the present invention is not limited to the sweeping robot. The robot in the embodiments of the present application refers generally to any mechanical device capable of performing spatial movement in an environment where the robot is located, for example, a sweeping robot, a accompanying robot, a guiding robot, etc., and may also be a purifier, an unmanned vehicle, etc. Of course, the task to be performed by the robot may be different for different robot configurations, and is not limited thereto.
The invention further discloses a chip, and a built-in control program is used for controlling the mobile robot to execute the optimal collision point searching method in the previous embodiment. The chip marks a grid corresponding to the optimal collision point in the pre-configured map, solves the problem of unstable laser data (including coordinates, detection angles and laser distances of the laser points) or unstable results caused by noise in the prior art, filters noise information in an image area corresponding to the pre-configured map, reduces the probability of selecting the position of the outline of an isolated obstacle as the obstacle collision point, reduces the probability of selecting the position without the obstacle in the actual physical environment as the obstacle collision point, and enhances the environmental adaptability of the coordinates of the optimal collision point.
It is to be understood that the embodiments of the optimal collision point search method described herein may be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may 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.
Another embodiment of the present invention further discloses a robot equipped with a laser sensor supporting 360-degree detection, where the robot is provided with the chip described in the foregoing embodiment, and is configured to control the robot to obtain an optimal collision point from a continuous obstacle closest to a machine body, and then control the robot to navigate to the optimal collision point, so as to start walking along a wall obstacle to which the optimal collision point belongs. Generally, according to the realization requirement of the edge navigation, a plurality of laser radars assembled by the robot can be arranged at different positions so as to achieve the purpose of obtaining the cloud data of the obstacle points around the machine body. The laser sensor supports real-time scanning to construct a laser map, and the laser map is stored in a chip built in the robot.
The foregoing embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the present invention and to implement the same according to the present invention, not to limit the scope of the present invention. All changes and modifications that come within the meaning and range of equivalency of the invention are to be embraced within their scope.

Claims (20)

1. The optimal collision point searching method based on the laser points is characterized by comprising the following steps of:
searching grids meeting preset communication conditions in a preset map, marking the coordinates of the grids meeting the preset communication conditions as coordinates of optimal collision points in the preset map, and determining that the physical positions reflected by the laser points corresponding to the grids meeting the preset communication conditions are the optimal collision points.
2. The optimal collision point searching method according to claim 1, wherein the method of searching for a grid satisfying a preset connection condition in the preset map and marking coordinates of the grid satisfying the preset connection condition as coordinates of the optimal collision point comprises:
when a grid meeting the first preset communication condition is searched in the preset map, marking the coordinate of the grid meeting the first preset communication condition as the coordinate of the optimal collision point in the preset map;
Searching a grid meeting a second preset communication condition in the preset map after the grid meeting the first preset communication condition cannot be searched in the preset map, and marking the coordinates of the grid meeting the second preset communication condition as the coordinates of the optimal collision point in the preset map;
the preset communication conditions comprise a first preset communication condition or a second preset communication condition.
3. The optimal collision point searching method according to claim 2, wherein when a grid meeting a first preset communication condition is not searched and a grid meeting a second preset communication condition is not searched, a laser point with the smallest laser distance is searched in a laser frame, and then coordinates of the grid corresponding to the laser point are marked as coordinates of the optimal collision point in a preset map;
the laser points searched by the robot are all from laser frames acquired by the robot; one laser spot corresponds to one laser distance.
4. The optimal collision point search method according to claim 2, wherein the laser point is a reflection position of laser light emitted by a laser sensor for characterizing the robot on an obstacle, and the laser point is a laser frame acquired from the robot;
The laser points are positioned in the effective detection angle range of the laser sensor and mapped into corresponding grids of the pre-configured map;
in the effective detection angle range, one laser point corresponds to one unit detection angle, one laser point corresponds to one grid, one laser point corresponds to one laser distance, and the laser distance is used for reflecting the distance between the detected obstacle and the laser sensor installed on the robot.
5. The optimal collision point search method according to claim 4, wherein the grid satisfying the first preset communication condition is: in the pre-configured map, the number of the optimal neighborhood connected pixels is larger than a preset pixel number threshold value, and the grid corresponding to the first effective laser point with the largest number of the optimal neighborhood connected pixels and the smallest laser distance;
the method comprises the steps that a preset range of a grid corresponding to a first effective laser point covers the grid corresponding to the first effective laser point;
wherein, the optimal 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 preset map; one grid corresponds to one connected pixel number;
The first effective laser point is a laser point with a laser distance within a preset detection distance range.
6. The optimal collision point search method according to claim 5, wherein the method of searching for a grid satisfying a first preset connection condition in a preset map comprises:
each time all grids in a preset range of grids corresponding to one first effective laser point are searched, marking the first effective laser points with the number of the optimal neighborhood connected pixels being larger than a preset pixel number threshold as first one-to-one target laser points;
when all grids in a preset range of grids corresponding to each first effective laser point are searched, if only one first two-target laser point exists, marking the grid corresponding to the first two-target laser point as a grid meeting a first preset communication condition, marking the coordinate of the grid corresponding to the first two-target laser point as the coordinate of an optimal collision point in the preset map, and determining that the physical position point where the first two-target laser point is located is the optimal collision point;
when all grids in a preset range of grids corresponding to each first effective laser point are searched, if at least two first two-second-target laser points exist, marking the grid corresponding to the first two-second-target laser point with the smallest laser distance as a grid meeting a first preset communication condition, marking the coordinate of the grid corresponding to the first two-target laser point with the smallest laser distance as the coordinate of an optimal collision point in the preset map, and determining that the physical position point where the first two-second-target laser point is located is the optimal collision point;
Wherein the first two-target laser points are the first one-target laser points with the largest number of best neighborhood connected pixels in the pre-configuration map.
7. The optimal collision point searching method according to claim 6, wherein after searching all grids within a preset range of grids corresponding to each first effective laser point, if a grid with the number of connected pixels larger than a preset pixel number threshold cannot be searched in a preset map, determining that a grid meeting a first preset connection condition cannot be searched in the preset map, and then starting searching the grid meeting a second preset connection condition in the preset map;
wherein the number of connected pixels is used to reflect the size of the obstacle such that a grid satisfying a first preset connection condition or a grid satisfying a second preset connection condition is configured as a grid occupied by the continuous obstacle.
8. The optimal collision point search method according to claim 7, wherein the grid satisfying the second preset communication condition is: in the pre-configured map, the optimal neighborhood is communicated with a grid corresponding to a second effective laser point with the number of pixels larger than a threshold value of the preset number of pixels and the minimum laser distance;
Wherein, the preset range of the grid corresponding to the second effective laser point is covered to the grid corresponding to the second effective laser point;
wherein, the optimal neighborhood connected pixel number of a second 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 second effective laser point and the preset map;
wherein the second effective laser point is a laser point whose laser distance is associated with the size of the fuselage; the distribution range of the second effective laser point in the pre-configuration map is larger than that of the first effective laser point in the pre-configuration map.
9. The optimal collision point search method according to claim 8, wherein the method of searching for a grid satisfying a second preset connection condition in the preset map comprises:
every time all grids in a preset range of grids corresponding to a second effective laser point are searched, when the second effective laser point with the optimal neighborhood connected pixels being larger than a preset pixel number threshold value is detected, the second effective laser point is marked as a second target laser point;
when all grids in the preset range of the grids corresponding to each second effective laser point are searched, marking the grid corresponding to the second target laser point with the smallest laser distance as the grid meeting the second preset communication condition, marking the coordinate of the grid corresponding to the second target laser point as the coordinate of the optimal collision point in the preset map, and determining that the physical position of the second target laser point is the optimal collision point.
10. The method for searching for the optimal collision point according to claim 9, wherein after searching for all grids within a preset range of grids corresponding to each second effective laser point, if no grid with the number of connected pixels greater than a preset pixel number threshold is searched for in the preset map, determining that the grid meeting the second preset connection condition is not searched for in the preset map, searching for the laser point with the smallest laser distance in the laser frame, marking the coordinate of the grid corresponding to the laser point as the coordinate of the optimal collision point in the preset map, and determining that the physical position where the laser point is located is the optimal collision point.
11. The method for searching for an optimal collision point according to claim 4, wherein the sources of coordinates of the grid corresponding to the laser point include: and converting the laser point into a coordinate system of the pre-configured map by converting the coordinate of the laser point subjected to the coordinate shift into grid coordinates according to a preset ratio by taking a trigonometric function conversion result of the laser distance of the laser point as a coordinate shift amount.
12. The optimal collision point search method according to claim 11, wherein the effective detection angle range of the laser sensor is 0 degrees to 360 degrees, and 360 laser points exist in the laser frame, corresponding to 360 different laser distances respectively;
The laser distance of the laser point changes along with the change of the unit detection angle of the laser point, and the unit detection angle of the laser point is in the effective detection angle range of the laser sensor.
13. The method for searching for an optimal collision point according to claim 5 or 8, wherein 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.
14. The method for searching for an optimal collision point according to claim 13, wherein the predetermined range of the grid corresponding to the laser point is a four-neighborhood region of the grid corresponding to the laser point, and includes a grid corresponding to the laser point and adjacent grids on the top, bottom, left and right sides centered on the grid corresponding to the laser point, so as to reduce the amount of calculation of coordinates.
15. The optimal collision point search method according to claim 11, wherein the grid corresponding to each 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 an image with a specific size, which is mapped by a laser point acquired by a laser sensor of the robot;
Each obstacle is composed of adjacent pixel points with the same pixel value in the pre-configuration map, so that each obstacle is composed of adjacent grids in the pre-configuration map.
16. The optimal collision point search method according to claim 15, wherein the number of connected pixels of one grid is the number of grids contained in a connected domain in which the grid is located, such that a grid corresponding to one laser point corresponds to one 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 collision point search method according to claim 16, wherein a closing operation is performed on the pre-configured map before a grid satisfying a preset connection condition is searched in the pre-configured map, so that an outline of an obstacle marked in the pre-configured map is completely described, wherein the closing operation is used for connecting a connected domain in the pre-configured map;
Wherein the pre-configured map is an image of a specific size constructed by the robot to describe the position features of the laser spot.
18. The optimal collision point search method of claim 17, wherein the closing operation comprises:
after the preset map is subjected to binarization processing, a binarization map is obtained; then, performing image expansion processing on the binary map, and performing image corrosion processing on the binary map subjected to the image expansion processing, so that partial pixels representing non-obstacles are configured as pixels representing the obstacles;
in the binarized map, the pixel value of the pixel representing the obstacle is different from the pixel value of the pixel representing the non-obstacle.
19. A chip, built-in with a control program for controlling a robot to execute the optimum collision point search method according to any one of claims 1 to 18.
20. A robot equipped with a laser sensor supporting 360 degree probing, characterized in that the robot incorporates the chip of claim 19.
CN202210029259.3A 2022-01-12 2022-01-12 Optimal collision point searching method based on laser points, chip and robot Pending CN116466694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210029259.3A CN116466694A (en) 2022-01-12 2022-01-12 Optimal collision point searching method based on laser points, chip and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210029259.3A CN116466694A (en) 2022-01-12 2022-01-12 Optimal collision point searching method based on laser points, chip and robot

Publications (1)

Publication Number Publication Date
CN116466694A true CN116466694A (en) 2023-07-21

Family

ID=87177491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210029259.3A Pending CN116466694A (en) 2022-01-12 2022-01-12 Optimal collision point searching method based on laser points, chip and robot

Country Status (1)

Country Link
CN (1) CN116466694A (en)

Similar Documents

Publication Publication Date Title
EP4043988A1 (en) Robot edge treading areal sweep planning method, chip, and robot
CN111857127B (en) Clean partition planning method for robot walking along edge, chip and robot
JP4450532B2 (en) Relative position measuring device
CN107766405A (en) Automotive vehicle road model defines system
CN112445212A (en) Path planning method, system, robot and readable storage medium
CN113741438A (en) Path planning method and device, storage medium, chip and robot
EP3987995B1 (en) Method for expanding working area based on laser map, chip and robot
CN111582566A (en) Path planning method and planning device, intelligent robot and storage medium
JP6649743B2 (en) Matching evaluation device and matching evaluation method
CN113076824B (en) Parking space acquisition method and device, vehicle-mounted terminal and storage medium
CN111240322B (en) Method for determining working starting point of robot movement limiting frame and motion control method
CN115728781A (en) Small obstacle detection method and device based on laser radar point cloud
CN116533998B (en) Automatic driving method, device, equipment, storage medium and vehicle of vehicle
CN116466694A (en) Optimal collision point searching method based on laser points, chip and robot
CN116466695A (en) Optimal obstacle collision point searching method
CN116331025A (en) Charging pile, charging pile system, pile returning method, device and mowing robot
CN116465404A (en) Optimal collision point searching method based on preset detection distance range
CN115587603A (en) Robot and method and system for identifying workstation thereof, storage medium and workstation
CN114488026A (en) Underground parking garage passable space detection method based on 4D millimeter wave radar
CN116540685A (en) Boundary configuration method based on obstacle pixel points, chip and robot
CN116540684A (en) Pixel-based working area planning method, chip and robot
CN117948984B (en) Path planning method of mobile operation robot in variable width traffic domain
KR102618951B1 (en) Method for visual mapping, and computer program recorded on record-medium for executing method therefor
US20230266469A1 (en) System and method for detecting road intersection on point cloud height map
WO2022213749A1 (en) Method and apparatus for controlling movement, cleaning robot, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination